Synchronization can be controlled by an optional SynchronizationOptions object passed to the synchronization methods. When no SynchronizationOptions object is specified, default values are used. The following table lists the properties available in the SynchronizationOptions class and lists the default value of each one.
Option | Description | Default value |
AllowCreations | New files can be created during the synchronization process. | true |
AllowDeletions | Files can be deleted during the synchronization process. | false |
AutoConflictResolution | Conflicts should be resolved automatically. | false |
ByteProgressionTriggerThreshold | An integer value specifying the number of bytes required to trigger the SynchronizationProgression event. | ushort.MaxValue |
CompareFileData | File data will be compared to detect conflicts between files. If set to false, only the date and time of files will be used to detect conflicts. Can enhance performance but creates a risk of data loss. | true |
PerformRefresh | FileSystemItem.Refresh should be called before using an item's dates and attributes in the synchronization. | true |
PreviewOnly | The synchronization will be performed in preview-mode only, that is, without making any changes to files. | false |
RecurseIntoSubfolders | Subfolders should be recursed into. | true |
UseMetaData | Meta data should be used during the synchronization. | true |
To use the synchronization options, simply instantiate a SynchronizationOptions object, set its properties, and pass it to either the static EasySynchronize or the Synchronize method.