FileSyncProvider Constructor (Guid, String, FileSyncScopeFilter, FileSyncOptions)
Initializes a new instance of the FileSyncProvider class that is based on the specified replica ID, root directory path, scope filter, and configuration options.
Assembly: Microsoft.Synchronization.Files (in Microsoft.Synchronization.Files.dll)
public:
FileSyncProvider(
Guid replicaId,
String^ rootDirectoryPath,
FileSyncScopeFilter^ scopeFilter,
FileSyncOptions fileSyncOptions
)
Parameters
- replicaId
- Type: System::Guid
The ID of the replica.
- 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. The default value is None.
| Exception | Condition |
|---|---|
| ArgumentNullException | rootDirectoryPath is a nullptr. |
| ArgumentException | replicaId is Empty, rootDirectoryPath is 0 length, rootDirectoryPath contains wildcards, or rootDirectoryPath 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. |
Show: