-api-id | -api-type |
---|---|
M:Windows.Storage.StorageFile.CopyAsync(Windows.Storage.IStorageFolder,System.String) |
winrt method |
Creates a copy of the file in the specified folder and renames the copy.
The destination folder where the copy of the file is created.
The new name for the copy of the file created in the destinationFolder.
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)
You don't have permission to copy a file into the destination folder.
CopyAsync(IStorageFolder), CopyAsync(IStorageFolder, String, NameCollisionOption)