SharedStorageAccessManager.CopySharedFileAsync method

Copies a file to the specified destination. For files that have been shared with a file association.


public static IAsyncOperation<IStorageFile> CopySharedFileAsync(
  StorageFolder destinationFolder, 
  string desiredName, 
  NameCollisionOption option, 
  string fileToken
Public Shared Function CopySharedFileAsync(
  destinationFolder As StorageFolder,  
  desiredName As String,  
  option As NameCollisionOption,  
  fileToken As String 
) As IAsyncOperation(Of IStorageFile)
static IAsyncOperation<IStorageFile>^ CopySharedFileAsync(
  StorageFolder^ destinationFolder, 
  String^ desiredName, 
  NameCollisionOption option, 
  String^ fileToken


  • destinationFolder
    Type: StorageFolder

    The destination folder, where the file will be copied to.

  • desiredName
    Type: System.String [.NET] | Platform::String [C++]

    The name of the new file in the destination folder.

  • option
    Type: NameCollisionOption

    Specifies what to do if there is an existing file with the same name in the destination folder.

  • fileToken
    Type: System.String [.NET] | Platform::String [C++]

    The ID of the file from the file association.

Return value

Type: IAsyncOperation<IStorageFile>

The asynchronous copy operation, returning a reference to the file in the destination folder.


Minimum supported client

None supported

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8


Windows.Phone.Storage.SharedAccess Windows::Phone::Storage::SharedAccess [C++]



See also