FileSyncProvider Constructor (String)
Initializes a new instance of the FileSyncProvider class based on the specified root directory path.
Assembly: Microsoft.Synchronization.Files (in Microsoft.Synchronization.Files.dll)
| Exception | Condition |
|---|---|
| ArgumentNullException | rootDirectoryPath is a nullptr. |
| ArgumentException | rootDirectoryPath is 0 length, rootDirectoryPath contains wildcards, or rootDirectoryPath does not exist. |
| ReplicaMetadataInUseException | Another provider instance was previously initialized with the same values for directory path and metadata file path, but has not yet been released. |
This form of the constructor can be used when the application does not use a replica ID to identify the replica. In this case, a replica ID is created and used by the object and stored in the metadata storage file.
This form of the constructor initializes the location of the metadata storage file and temporary files to be rootDirectoryPath. It initializes the path to save conflict loser files to a nullptr, and names the metadata storage file filesync.metadata. It initializes the filter to a nullptr and the configuration options to None.