Copies the file to the specified destination file, truncating any remaining data in the destination file.
Syntax
public static Task CopyToAsync(this IFile source, IFile destination, bool overwrite = true, bool createDirectory = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Name |
Type |
Description |
source |
IFile |
The source file. |
destination |
IFile |
The destination file. |
overwrite |
bool |
Will overwrite existing destination file if set to true . |
createDirectory |
bool |
Will create any needed directories that don't already exist if set to true . |
cancellationToken |
CancellationToken |
A cancellation token. |
Return Value