Synchronizes the given local directory with the given remote directory
according to the given synchronization rules.
Namespace: EnterpriseDT.Net.FtpAssembly: edtFTPnetPRO (in edtFTPnetPRO.dll) Version: 9.4.0.40
Syntax
C# |
---|
public FTPSyncResults Synchronize( string localDirectory, string serverDirectory, FTPSyncRules syncRules ) |
Visual Basic |
---|
Public Function Synchronize ( _ localDirectory As String, _ serverDirectory As String, _ syncRules As FTPSyncRules _ ) As FTPSyncResults |
Visual C++ |
---|
public: FTPSyncResults^ Synchronize( String^ localDirectory, String^ serverDirectory, FTPSyncRules^ syncRules ) |
Parameters
- localDirectory
- Type: System..::..String
Directory on the local machine to synchronize. If this argument is null then [!:LocalDirectory] will be used.
- serverDirectory
- Type: System..::..String
Directory on the server to synchronize. If this argument is null then [!:ServerDirectory] will be used.
- syncRules
- Type: EnterpriseDT.Net.Ftp..::..FTPSyncRules
Rules to apply to the synchronization operation. If this argument is null then DefaultSyncRules will be used.
Return Value
[!:FTPSyncReport] containing results of synchronization operationRemarks
Synchronization aims to ensure that the files in a directory on the local machine match those in a directory on the remote machine.
The instructions contained in FTPSyncRules inform the synchronization process how files should be matched. If these rules are insufficient then the SynchronizingFile event may be used to provide customized logic for matching files.
The Synchronizing and Synchronized events are triggered before and after the synchronization operation is performed, respectively.