Class MoveDirectory
Moves the content of a directory to a new location preserving file timestamps, symlinks and hard links.
Implements
Inherited Members
Namespace: NanoByte.Common.Storage
Assembly: NanoByte.Common.dll
Syntax
public class MoveDirectory : CopyDirectory, ITask
Constructors
MoveDirectory(String, String)
Creates a new directory move task.
Declaration
public MoveDirectory(string sourcePath, string destinationPath)
Parameters
Type | Name | Description |
---|---|---|
String | sourcePath | The path of source directory. Must exist! |
String | destinationPath | The path of the target directory. May exist. |
Methods
CopyFile(FileInfo, FileInfo)
Copies a single file from one location to another. Can be overridden to modify the copying behavior.
Declaration
protected override void CopyFile(FileInfo sourceFile, FileInfo destinationFile)
Parameters
Type | Name | Description |
---|---|---|
FileInfo | sourceFile | |
FileInfo | destinationFile |
Overrides
Exceptions
Type | Condition |
---|---|
IOException | A problem occurred while copying the file. |
UnauthorizedAccessException | Read access to the |
Execute()
Declaration
protected override void Execute()