Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.36 KB

storagefile_copyasync_1709017142.md

File metadata and controls

38 lines (26 loc) · 1.36 KB
-api-id -api-type
M:Windows.Storage.StorageFile.CopyAsync(Windows.Storage.IStorageFolder,System.String)
winrt method

Windows.Storage.StorageFile.CopyAsync

-description

Creates a copy of the file in the specified folder and renames the copy.

-parameters

-param destinationFolder

The destination folder where the copy of the file is created.

-param desiredNewName

The new name for the copy of the file created in the destinationFolder.

-returns

When this method completes, it returns a StorageFile that represents the copy of the file created in the destinationFolder.

Note

When StorageFile.CopyAsync is used to copy a file that is encrypted to a destination that is not encrypted, the call will fail with the following exception: System.UnauthorizedAccessException: Access is denied. (Excep_FromHResult 0x80070005)

-exceptions

T:System.UnauthorizedAccessException

You don't have permission to copy a file into the destination folder.

-remarks

-examples

-see-also

CopyAsync(IStorageFolder), CopyAsync(IStorageFolder, String, NameCollisionOption)