C# Class NanoByte.Common.Storage.CopyDirectory

Copies the content of a directory to a new location preserving the original file modification times and relative Unix symlinks.
Inheritance: NanoByte.Common.Tasks.TaskBase
Afficher le fichier Open project: nano-byte/common

Méthodes publiques

Méthode Description
CopyDirectory ( [ sourcePath, [ destinationPath, bool preserveDirectoryTimestamps = true, bool overwrite = false ) : System

Creates a new directory copy task.

Méthodes protégées

Méthode Description
CopyFile ( [ sourceFile, [ destinationFile ) : void

Copies a single file from one location to another. Can be overridden to modify the copying behavior.

CreateSymlink ( [ linkPath, [ linkTarget ) : void

Creates a Unix symbolic link. Can be overridden to modify the symlinking behavior.

Execute ( ) : void

Private Methods

Méthode Description
CopyDirectories ( IEnumerable sourceDirectories ) : void
CopyDirectoryTimestamps ( IEnumerable sourceDirectories ) : void
CopyFiles ( IEnumerable sourceFiles ) : void
PathInDestination ( FileSystemInfo element ) : string

Method Details

CopyDirectory() public méthode

Creates a new directory copy task.
public CopyDirectory ( [ sourcePath, [ destinationPath, bool preserveDirectoryTimestamps = true, bool overwrite = false ) : System
sourcePath [ The path of source directory. Must exist!
destinationPath [ The path of the target directory. May exist. Must be empty if is false.
preserveDirectoryTimestamps bool true to preserve the modification times for directories as well; false to preserve only the file modification times.
overwrite bool Overwrite exisiting files and directories at the . This will even replace read-only files!
Résultat System

CopyFile() protected méthode

Copies a single file from one location to another. Can be overridden to modify the copying behavior.
A problem occurred while copying the file. Read access to the or write access to the is not permitted.
protected CopyFile ( [ sourceFile, [ destinationFile ) : void
sourceFile [
destinationFile [
Résultat void

CreateSymlink() protected méthode

Creates a Unix symbolic link. Can be overridden to modify the symlinking behavior.
The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights). The underlying Unix subsystem failed to process the request (e.g. because of insufficient rights).
protected CreateSymlink ( [ linkPath, [ linkTarget ) : void
linkPath [ The path of the link to create.
linkTarget [ The path of the existing file or directory to point to (relative to ).
Résultat void

Execute() protected méthode

protected Execute ( ) : void
Résultat void