Export (0) Print
Expand All

Microsoft.Synchronization.Files Namespace

The file synchronization provider is a component of Sync Framework that helps an application synchronize files, folders, and subfolders in NTFS, FAT, or SMB file systems. The directories to synchronize can be local or remote and do not have to be of the same file system. Static filters can be used to exclude or include files either by listing them explicitly or by using wildcard characters, such as *.txt; or filters can be set that exclude individual subfolders. Progress reports can be obtained by registering to receive notifications during synchronization.

The centerpiece of the service is FileSyncProvider. Because it implements KnowledgeSyncProvider, the file synchronization provider only has to be created, initialized, and passed to a SyncAgent to perform synchronization.

A static filter is represented by FileSyncScopeFilter and can be used for finer control over which files or folders participate in synchronization.

Several events are available from the file synchronization provider, such as AppliedChange and CopyingFile. An application can register to receive notifications from any of these events. This enables the application to show synchronization progress to the user or take some other action.

The file synchronization provider uses the metadata storage service to store all synchronization metadata in a lightweight database. The metadata database is a single file. This file can be stored with the files and folders to be synchronized or in another location that is specified when the provider is initialized. For more information, see Sync Framework Metadata Storage Service.

For more information about how to use the file synchronization provider, see Synchronizing Files.

  ClassDescription
Public classAppliedChangeEventArgsProvides data for the AppliedChange event.
Public classApplyingChangeEventArgsProvides data for the ApplyingChange event.
Public classCopyingFileEventArgsProvides data for the CopyingFile event.
Public classDetectedChangesEventArgsProvides data for the DetectedChanges event.
Public classDetectingChangesEventArgsProvides data for the DetectingChanges event.
Public classFileDataRepresents information about a file or directory. This is a loose wrapper of the WIN32_FIND_DATA structure that contains additional path information.
Public classFileSyncInvalidOperationExceptionThe exception that is thrown when a method call is invalid for the current state of the object.
Public classFileSyncProviderIs a synchronous synchronization provider that can be used to synchronize files, folders, and subfolders in NTFS, FAT, or SMB file systems.
Public classFileSyncScopeFilterDefines filters that can be used to include or exclude files and folders from the static synchronization scope.
Public classSkippedChangeEventArgsProvides data for the SkippedChange event.
Public classSkippedFileDetectEventArgsProvides data for the SkippedFileDetect event.

  InterfaceDescription
Public interfaceIFileDataRetrieverRepresents the mechanism by which a file synchronization provider and a custom provider transfer data between each other.

  EnumerationDescription
Public enumerationChangeTypeRepresents the different types of changes that can be applied to a destination replica.
Public enumerationFileSyncOptionsProvides options to configure the behavior of the file synchronization provider.
Public enumerationSkipReasonRepresents the reason why a file was skipped during change detection or change application.
Show:
© 2015 Microsoft