Dart.Ftp Namespace : Synchronize Enumeration |
<FlagsAttribute()> Public Enum Synchronize Inherits System.Enum
Dim instance As Synchronize
[Flags()] public enum Synchronize : System.Enum
[Flags()] public enum class Synchronize : public System.Enum
Member | Description |
---|---|
Off | No synchronization - the entire file will always be copied. |
On | Synchronizes the source to the destination. |
SetDateTime | Sets the destination file's modified DateTime to the source file's after the transfer operation is complete. |
The values of this enumeration can be used as bit flags to indicate multiple techniques.
WARNING: The synchronization algorithm used by Synchronize.On is not suitable for ALL scenarios, so you should ensure its use is compatible with technical requirements:
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 sizes match, then no copy is performed. If the files are synchronized and the destination file is smaller, then the missing bytes are appended. If the files are synchronized and the destination file is bigger, then corruption is assumed and a full copy is performed. If the files are not synchronized, then a full copy is performed.
Synchronize.SetDateTime - This option indicates that the destination file DateTime (UTC, LastWrittenTo) should be set to the source DateTime after the transfer operation is complete. Server support for the MFMT (Modify Fact: Modification Time) command or MDTM set is required to update the destination file's DateTime when Put is used. No Exception is thrown if the attempt fails - check CopyResult.DateTimeSet to confirm that the action was completed successfully.
private void putFile() { ftp1.Get("testfile.txt", myLocalDirectory + "\\testfile.txt", Synchronize.On | Synchronize.SetDateTime); }
Private Sub putFile() ftp1.Get("testfile.txt", myLocalDirectory & "\testfile.txt", Synchronize.Off Or Synchronize.SetDateTime) End Sub
System.Object
System.ValueType
System.Enum
Dart.Ftp.Synchronize