C# Class BlinkSyncLib.Sync

Folders and files synchronization
Afficher le fichier Open project: dvoituron/BlinkSyncLib Class Usage Examples

Méthodes publiques

Méthode Description
DeleteDirectory ( DirectoryInfo directory ) : void

Robustly deletes a directory including all subdirectories and contents

GetDirectories ( DirectoryInfo directoryInfo, InputParams inputParams, SyncResults &results ) : System.IO.DirectoryInfo[]

Gets list of subdirectories of specified directory, optionally filtered by specified input parameters

GetFiles ( DirectoryInfo directoryInfo, InputParams inputParams, SyncResults &results ) : System.IO.FileInfo[]

Gets list of files in specified directory, optionally filtered by specified input parameters

Start ( ) : SyncResults

Performs one-way synchronization from source directory tree to destination directory tree

Start ( InputParams configuration ) : SyncResults

Performs one-way synchronization from source directory tree to destination directory tree

Sync ( ) : System

Initializes a new instance of Synchonizer object.

Sync ( string sourceDirectory, string destinationDirectory ) : System

Initializes a new instance of Synchonizer object.

Private Methods

Méthode Description
PrintUsage ( ) : void

Prints usage

ProcessDirectory ( string srcDir, string destDir, InputParams inputParams, SyncResults &results ) : bool

Recursively performs one-way synchronization from a single source to destination directory

ShouldExclude ( Regex excludeList, Regex includeList, string name ) : bool

For a given include and exclude list of regex's and a name to match, determines if the named item should be excluded

Trace ( string message ) : void

Trace message

Validate ( string srcDir, string destDir, InputParams parameters ) : bool

Validate folder and parameters

Method Details

DeleteDirectory() public méthode

Robustly deletes a directory including all subdirectories and contents
public DeleteDirectory ( DirectoryInfo directory ) : void
directory System.IO.DirectoryInfo
Résultat void

GetDirectories() public méthode

Gets list of subdirectories of specified directory, optionally filtered by specified input parameters
public GetDirectories ( DirectoryInfo directoryInfo, InputParams inputParams, SyncResults &results ) : System.IO.DirectoryInfo[]
directoryInfo System.IO.DirectoryInfo
inputParams InputParams
results SyncResults
Résultat System.IO.DirectoryInfo[]

GetFiles() public méthode

Gets list of files in specified directory, optionally filtered by specified input parameters
public GetFiles ( DirectoryInfo directoryInfo, InputParams inputParams, SyncResults &results ) : System.IO.FileInfo[]
directoryInfo System.IO.DirectoryInfo
inputParams InputParams
results SyncResults
Résultat System.IO.FileInfo[]

Start() public méthode

Performs one-way synchronization from source directory tree to destination directory tree
public Start ( ) : SyncResults
Résultat SyncResults

Start() public méthode

Performs one-way synchronization from source directory tree to destination directory tree
public Start ( InputParams configuration ) : SyncResults
configuration InputParams
Résultat SyncResults

Sync() public méthode

Initializes a new instance of Synchonizer object.
public Sync ( ) : System
Résultat System

Sync() public méthode

Initializes a new instance of Synchonizer object.
public Sync ( string sourceDirectory, string destinationDirectory ) : System
sourceDirectory string
destinationDirectory string
Résultat System