| GDStorageFileCopyAsync Method (IGDStorageFolder) |
Creates a copy of the file in the specified folder.
Namespace:
GD
Assembly:
GD (in GD.dll) Version: 255.255.255.255
Syntax public IAsyncOperation<GDStorageFile> CopyAsync(
IGDStorageFolder destinationFolder
)
public:
virtual IAsyncOperation<GDStorageFile^>^ CopyAsync(
[InAttribute] IGDStorageFolder^ destinationFolder
) sealed
function CopyAsync(destinationFolder);
Parameters
- destinationFolder
- Type: GDIGDStorageFolder
The destination folder where the copy is created.
Return Value
Type:
IAsyncOperationGDStorageFileWhen this method completes, it returns a
GDStorageFile that represents the copy.
Implements
IGDStorageFileCopyAsync(IGDStorageFolder)Exceptions Exception | Condition |
---|
AccessDeniedException | (C# equivalent: System.UnauthorizedAccessException) Secure storage was remotely wiped. |
Exception |
Name you specify is invalid. To handle all the ways the specified name could be invalid, you must catch all of these exceptions:
E_FAIL | ERROR_INVALID_NAME | ERROR_ALREADY_EXISTS | ERROR_INVALID_PARAMETER |
|
Remarks Examples
The following example shows how to get the folder that has the specified absolute path in the SDK secure storage.
using GD;
GDStorageFolder secureFolder = GDWindows.Instance.SecureFolder;
GDStorageFolder folder = await secureFolder.GetFolderAsync("some_folder");
GDStorageFile newFile = await secureFolder.CreateFileAsync("test.txt");
GDStorageFile copiedFile = await newFile.CopyAsync(folder);
See Also