Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

LiveConnectClient.Copy(String, String) method

Copies the file from the given path to the destination path.

Syntax


public Task<LiveOperationResult> Copy(
  string path, 
  string destination
)

Parameters

path

Type: System.String

The resource ID of the file to copy.

destination

Type: System.String

The destination path to which the item is copied.

Return value

Type: Task<LiveOperationResult>

The data returned by the API service for the copy operation.

Note  

Doesn't return a value on the Windows Phone.

Error codes

NameMeaning
ArgumentNullException

A parameter that was passed in is null.

Remarks

This is a helper function that makes calls using HTTP COPY to the Live SDK REST reference. It supports all paths and methods in the REST API for read and write.

CopyAsync on Windows Phone is supported only for use with Microsoft OneDrive files.

CopyAsync automatically uses the access token returned from user sign-in by the constructor, making it possible for a site to omit working directly with access tokens. If the access token cookie is set, CopyAsync uses that as well.

Important  Before calling this method, your code must call either the LiveAuthClient.InitializeAsync or LiveAuthClient.LoginAsync method with, at minimum, the corresponding necessary scopes for [downloading | uploading | copying | deleting | reading | moving | creating | updating] the corresponding [data | files | file]. If you don’t, the call to this method may fail.

Requirements

Minimum supported client

Windows 8

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

Namespace

Microsoft.Live

Assembly

Microsoft.Live.dll

See also

LiveConnectClient
CopyAsync(String, String, Object)
CopyAsync(String, String, CancellationToken)

 

 

Show:
© 2014 Microsoft