FileSyncProvider Constructor (String, FileSyncScopeFilter, FileSyncOptions, String, String, String, String)
Initializes a new instance of the FileSyncProvider class that is based on the specified root directory path, scope filter, configuration options, metadata storage file path, metadata storage file name, temporary file path, and path to store conflict loser files.
Assembly: Microsoft.Synchronization.Files (in Microsoft.Synchronization.Files.dll)
public:
FileSyncProvider(
String^ rootDirectoryPath,
FileSyncScopeFilter^ scopeFilter,
FileSyncOptions fileSyncOptions,
String^ metadataDirectoryPath,
String^ metadataFileName,
String^ tempDirectoryPath,
String^ pathToSaveConflictLoserFiles
)
Parameters
- rootDirectoryPath
- Type: System::String
The absolute path to the local file store for this provider. This is the folder that contains the files and subfolders to be synchronized.
- scopeFilter
- Type: Microsoft.Synchronization.Files::FileSyncScopeFilter
A static scope filter that specifies which files or directories in the local file store are included in the scope. Can be a nullptr.
- fileSyncOptions
- Type: Microsoft.Synchronization.Files::FileSyncOptions
Flags that determine the behavior of the provider during synchronization.
- metadataDirectoryPath
- Type: System::String
The absolute path to the metadata storage file. The directory must be created before calling this constructor. The application must ensure this directory is secured with the right level of security permissions to prevent information disclosure.
- metadataFileName
- Type: System::String
The name of the metadata storage file.
- tempDirectoryPath
- Type: System::String
The absolute path where temporary files will be stored. The directory must be created before calling this constructor. The application must ensure this directory is secured with the right level of security permissions to prevent information disclosure.
- pathToSaveConflictLoserFiles
- Type: System::String
The absolute path where files that are conflict losers will be stored. The directory must be created before calling this constructor. To help prevent information disclosure, the application must ensure that this directory is secured with the appropriate level of security permissions. Can be a nullptr.
| Exception | Condition |
|---|---|
| ArgumentNullException | rootDirectoryPath is a nullptr. |
| ArgumentException | rootDirectoryPath, metadataDirectoryPath, metadataFileName, tempDirectoryPath, or pathToSaveConflictLoserFiles is 0 length; rootDirectoryPath, metadataDirectoryPath, metadataFileName, tempDirectoryPath, or pathToSaveConflictLoserFiles contains wildcards; or rootDirectoryPath, metadataDirectoryPath, tempDirectoryPath, or pathToSaveConflictLoserFiles does not exist. |
| ArgumentOutOfRangeException | fileSyncOptions is not in the FileSyncOptions enumeration. |
| ReplicaMetadataInUseException | Another provider instance was previously initialized with the same values for directory path and metadata file path, but has not yet been released. |