Show / Hide Table of Contents

Class MoveDirectory

Moves the content of a directory to a new location preserving file timestamps, symlinks and hard links.

Inheritance
Object
TaskBase
ReadDirectoryBase
CopyDirectory
MoveDirectory
Implements
ITask
Inherited Members
CopyDirectory.HandleDirectory(DirectoryInfo)
CopyDirectory.HandleFile(FileInfo, FileInfo)
CopyDirectory.Name
CopyDirectory.UnitsByte
CopyDirectory.Overwrite
ReadDirectoryBase.Source
ReadDirectoryBase.FollowSymlinks
TaskBase.CancellationToken
TaskBase.CredentialProvider
TaskBase.Run(CancellationToken, ICredentialProvider, IProgress<TaskSnapshot>)
TaskBase.Tag
TaskBase.CanCancel
TaskBase.PreventIdle
TaskBase.State
TaskBase.UnitsProcessed
TaskBase.UnitsTotal
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
CopyDirectory.CopyFile(FileInfo, FileInfo)
Exceptions
Type Condition
IOException

A problem occurred while copying the file.

UnauthorizedAccessException

Read access to the sourceFile or write access to the destinationFile is not permitted.

Execute()

Declaration
protected override void Execute()
Overrides
CopyDirectory.Execute()

Implements

ITask

Extension Methods

UpdateUtils.To<TIn, TOut>(TIn, Func<TIn, TOut>)
JsonStorage.SaveJson<T>(T, Stream)
JsonStorage.SaveJson<T>(T, String)
JsonStorage.ToJsonString<T>(T)
JsonStorage.ReparseAsJson<T>(Object)
JsonStorage.ReparseAsJson<T>(Object, T)
XmlStorage.SaveXml(Object, Stream, String)
XmlStorage.SaveXml<T>(T, String, String)
XmlStorage.ToXmlString(Object, String)
ConversionUtils.ConvertToString<TType>(TType)
In This Article
Back to top Copyright Bastian Eicher