MoveFileAsync(string originalName, string newName, bool overwrite, System.Threading.CancellationToken cancellationToken) Method

Moves the specified file.

Syntax

public virtual System.Threading.Tasks.Task MoveFileAsync(string originalName, string newName, bool overwrite, System.Threading.CancellationToken cancellationToken)

Parameters

originalName
Type: string

The original name of the file.

newName
Type: string

The new name of the file.

overwrite
Type: bool

Value indicating whether a file can be overwritten if the target already exists.

cancellationToken
Type: System.Threading.CancellationToken

Cancellation token.

Remarks

The default implementation calls CopyFileAsync(string sourceName, string targetName, bool overwrite) and DeleteFileAsync(string fileName).