C# Class BlinkSyncLib.Sync

Folders and files synchronization
Mostra file Open project: dvoituron/BlinkSyncLib Class Usage Examples

Public Methods

Method 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

Method 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 method

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

GetDirectories() public method

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
return System.IO.DirectoryInfo[]

GetFiles() public method

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
return System.IO.FileInfo[]

Start() public method

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

Start() public method

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

Sync() public method

Initializes a new instance of Synchonizer object.
public Sync ( ) : System
return System

Sync() public method

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