Skip to main content

api.copy()

View Source: copy

function copy(fileId, destinationPath): Promise<{
id: string;
path: string;
}>;

Description

Copy a file to a new location.

Sample Code

TypeScript Example:

// Example usage of api.copy()
const result = await api.copy();
console.log(result);

Parameters

fileId

string

The unique identifier of the file

destinationPath

string

The destination path

Returns

Promise<{ id: string; path: string; }>

Promise resolving to new file ID