C# Class NanoByte.Common.Storage.MoveDirectory

Moves the content of a directory to a new location preserving the original file modification times.
Inheritance: CopyDirectory
Mostrar archivo Open project: nano-byte/common

Public Methods

Method Description
MoveDirectory ( string sourcePath, string destinationPath, bool preserveDirectoryTimestamps = true, bool overwrite = false ) : System

Creates a new directory move task.

Protected Methods

Method Description
CopyFile ( FileInfo sourceFile, FileInfo destinationFile ) : void
Execute ( ) : void

Method Details

CopyFile() protected method

protected CopyFile ( FileInfo sourceFile, FileInfo destinationFile ) : void
sourceFile System.IO.FileInfo
destinationFile System.IO.FileInfo
return void

Execute() protected method

protected Execute ( ) : void
return void

MoveDirectory() public method

Creates a new directory move task.
public MoveDirectory ( string sourcePath, string destinationPath, bool preserveDirectoryTimestamps = true, bool overwrite = false ) : System
sourcePath string The path of source directory. Must exist!
destinationPath string 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!
return System