ISAWHAppObject::IsFileSameAsOnServer
Description
Compares a local file with any version of a file on the server.
Syntax
long IsFileSameAsOnServer(
BSTR LocalFileName,
BSTR RemoteFileName,
long VersionNumberLow,
long VersionNumberHigh,
Enum_CompareFileBy
CompareFileBy,
Enum_SetLocalFileTime
SetLocalFileTime,
VARIANT_BOOL* IsFileSame,
VARIANT_BOOL* Cancelled,
BSTR* ResultDescription
);
Parameters
LocalFileName
[in] Specifies the path name of the local file.
RemoteFileName
[in] Specifies the full name of the server file.
VersionNumberLow
[in] Specifies the low-order 32 bits of the file version to be compared.
VersionNumberHigh
[in] Specifies the high-order 32 bits of the file version to be compared.
Note: VersionNumberLow and VersionNumberHigh form a single 64-bit version number.
CompareFileBy
[in] Specifies how to determine if the local copy is up-to-date, by checksum or by date/time.
SetLocalFileTime
[in] Specifies the type of time to be assigned to the local file.
IsFileSame
[out] Returns whether the two files are identical.
Cancelled
[out] If the method fails, returns whether the operation is cancelled.
ResultDescription
[out] Returns the description of the return value. If the method succeeds, returns
'Completed'. If the method fails, returns the description of the error.
Return Value
If the method succeeds, returns 0. If the method fails, returns other error codes.
See Also
Sample
VB Sample:
Dim WithEvents sdkObject As SAWHSDKLib.SAWHAppObject Set sdkObject = New SAWHSDKLib.SAWHAppObject Private Sub IsFileSameAsOnServer_Click() Dim Cancelled As Boolean Dim ResultDescription As String Dim LocalFileName As String Dim RemoteFileName As String Dim IsFileSame As Boolean RemoteFileName = "$/FileName.txt" LocalFileName = "D:\FileName.txt" Dim ResultValue As Long ResultValue = sdkObject.IsFileSameAsOnServer(LocalFileName, RemoteFileName, 1, 0, Enum_EOLNative, Enum_CompareFileByChecksum, Enum_SetLocalFileTimeCurrent, IsFileSame, Cancelled, ResultDescription) End Sub |