IStorageFile.CopyAsync IStorageFile.CopyAsync IStorageFile.CopyAsync IStorageFile.CopyAsync IStorageFile.CopyAsync Method

Definition

Overloads

CopyAsync(IStorageFolder) CopyAsync(IStorageFolder) CopyAsync(IStorageFolder) CopyAsync(IStorageFolder) CopyAsync(IStorageFolder)

Creates a copy of the file in the specified folder.

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

Creates a copy of the file in the specified folder, using the desired name.

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

Creates a copy of the file in the specified folder, using the desired name. This method also specifies what to do if an existing file in the specified folder has the same name.

CopyAsync(IStorageFolder) CopyAsync(IStorageFolder) CopyAsync(IStorageFolder) CopyAsync(IStorageFolder) CopyAsync(IStorageFolder)

Creates a copy of the file in the specified folder.

public : IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder)
IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder) const;
public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder)
Public Function CopyAsync(destinationFolder As IStorageFolder) As IAsyncOperation(Of StorageFile)
Windows.Storage.IStorageFile.copyAsync(destinationFolder).done( /* Your success and error handlers */ );

Parameters

destinationFolder
IStorageFolder IStorageFolder IStorageFolder

The destination folder where the copy is created.

Returns

When this method completes, it returns a StorageFile that represents the copy.

See also

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

Creates a copy of the file in the specified folder, using the desired name.

public : IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, Platform::String desiredNewName)
IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, winrt::hstring desiredNewName) const;
public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, String desiredNewName)
Public Function CopyAsync(destinationFolder As IStorageFolder, desiredNewName As String) As IAsyncOperation(Of StorageFile)
Windows.Storage.IStorageFile.copyAsync(destinationFolder, desiredNewName).done( /* Your success and error handlers */ );

Parameters

destinationFolder
IStorageFolder IStorageFolder IStorageFolder

The destination folder where the copy is created.

desiredNewName
String String String

The desired name of the copy.

If there is an existing file in the destination folder that already has the specified desiredNewName, Windows generates a unique name for the copy.

Returns

When this method completes, it returns a StorageFile that represents the copy.

See also

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

Creates a copy of the file in the specified folder, using the desired name. This method also specifies what to do if an existing file in the specified folder has the same name.

public : IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, Platform::String desiredNewName, NameCollisionOption option)
IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, winrt::hstring desiredNewName, NameCollisionOption option) const;
public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, String desiredNewName, NameCollisionOption option)
Public Function CopyAsync(destinationFolder As IStorageFolder, desiredNewName As String, option As NameCollisionOption) As IAsyncOperation(Of StorageFile)
Windows.Storage.IStorageFile.copyAsync(destinationFolder, desiredNewName, option).done( /* Your success and error handlers */ );

Parameters

destinationFolder
IStorageFolder IStorageFolder IStorageFolder

The destination folder where the copy is created.

desiredNewName
String String String

The desired name of the copy.

If there is an existing file in the destination folder that already has the specified desiredNewName, the specified NameCollisionOption determines how Windows responds to the conflict.

option
NameCollisionOption NameCollisionOption NameCollisionOption

An enum value that determines how Windows responds if the desiredNewName is the same as the name of an existing file in the destination folder.

Returns

When this method completes, it returns a StorageFile that represents the copy.

See also