FileSyncProvider Constructor (Guid, String)
Initializes a new instance of the FileSyncProvider class based on the specified replica ID and root directory path.
Namespace: Microsoft.Synchronization.Files
Assembly: Microsoft.Synchronization.Files (in Microsoft.Synchronization.Files.dll)
Syntax
'Declaration
Public Sub New ( _
replicaId As Guid, _
rootDirectoryPath As String _
)
'Usage
Dim replicaId As Guid
Dim rootDirectoryPath As String
Dim instance As New FileSyncProvider(replicaId, _
rootDirectoryPath)
public FileSyncProvider(
Guid replicaId,
string rootDirectoryPath
)
public:
FileSyncProvider(
Guid replicaId,
String^ rootDirectoryPath
)
new :
replicaId:Guid *
rootDirectoryPath:string -> FileSyncProvider
public function FileSyncProvider(
replicaId : Guid,
rootDirectoryPath : String
)
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.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | rootDirectoryPath is a null reference (Nothing in Visual Basic). |
ArgumentException | replicaId is Empty, 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. |
Remarks
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 null reference (Nothing in Visual Basic), and names the metadata storage file filesync.metadata. It initializes the filter to a null reference (Nothing in Visual Basic) and the configuration options to None.