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.
Namespace: Microsoft.Synchronization.Files
Assembly: Microsoft.Synchronization.Files (in microsoft.synchronization.files.dll)
Syntax
'Declaration
Public Sub New ( _
replicaId As Guid, _
rootDirectoryPath As String, _
scopeFilter As FileSyncScopeFilter, _
fileSyncOptions As FileSyncOptions _
)
'Usage
Dim replicaId As Guid
Dim rootDirectoryPath As String
Dim scopeFilter As FileSyncScopeFilter
Dim fileSyncOptions As FileSyncOptions
Dim instance As New FileSyncProvider(replicaId, rootDirectoryPath, scopeFilter, fileSyncOptions)
public FileSyncProvider (
Guid replicaId,
string rootDirectoryPath,
FileSyncScopeFilter scopeFilter,
FileSyncOptions fileSyncOptions
)
public:
FileSyncProvider (
Guid replicaId,
String^ rootDirectoryPath,
FileSyncScopeFilter^ scopeFilter,
FileSyncOptions fileSyncOptions
)
public FileSyncProvider (
Guid replicaId,
String rootDirectoryPath,
FileSyncScopeFilter scopeFilter,
FileSyncOptions fileSyncOptions
)
public function FileSyncProvider (
replicaId : Guid,
rootDirectoryPath : String,
scopeFilter : FileSyncScopeFilter,
fileSyncOptions : FileSyncOptions
)
Parameters
- replicaId
The ID of the replica.
- rootDirectoryPath
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
A static scope filter that specifies which files or directories in the local file store are included in the scope. Can be a null reference (Nothing in Visual Basic).
- fileSyncOptions
Flags that determine the behavior of the provider during synchronization. The default value is None.
Exceptions
Exception type | Condition |
---|---|
rootDirectoryPath is a null reference (Nothing in Visual Basic). |
|
replicaId is Empty, rootDirectoryPath is 0 length, rootDirectoryPath contains wildcards, or rootDirectoryPath does not exist. |
|
fileSyncOptions is not in the FileSyncOptions enumeration. |
|
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). It names the metadata storage file filesync.metadata.
See Also
Reference
FileSyncProvider Class
FileSyncProvider Members
Microsoft.Synchronization.Files Namespace