PowerTCP FTP for .NET
GetSynchronization Method



Path to the file on the server.
The local file.
Indicates a Get or a Put.
Computes a value that indicates whether a local and remote file are synchronized.
Syntax
Public Function GetSynchronization( _
   ByVal remotePath As String, _
   ByVal localFile As FileInfo, _
   ByVal action As CopyAction _
) As Long
Dim instance As Ftp
Dim remotePath As String
Dim localFile As FileInfo
Dim action As CopyAction
Dim value As Long
 
value = instance.GetSynchronization(remotePath, localFile, action)
public long GetSynchronization( 
   string remotePath,
   FileInfo localFile,
   CopyAction action
)
public:
int64 GetSynchronization( 
   String^ remotePath,
   FileInfo^ localFile,
   CopyAction action
) 

Parameters

remotePath
Path to the file on the server.
localFile
The local file.
action
Indicates a Get or a Put.

Return Value

-1 indicates the files are synchronized. 0 indicates the files are not synchronized. A value > 0 indicates a restart should be performed using value as the offset.
Remarks
If the destination file DateTime (UTC, LastWrittenTo) is more recent or the same as the source file, then the files are considered synchronized. If the files are synchronized and the destination file is smaller, then a restart is indicated by a return value > 0. If the files are synchronized and the destination file is bigger, then corruption is assumed 0 is returned. If the files are not synchronized, then 0 is returned.
See Also

Reference

Ftp Class
Ftp Members


PowerTCP FTP for .NET Documentation Version 6.1
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic