storage API

Copy

Copy a file resource under as specified by newPath under the current project

// copy
await storageInterface.copy("copyJs/vendor/test.js","test-copy.js");
// move
await storageInterface.copy("copyJs/vendor/test.js","test-copy.js",true);

Parameters

path
string - File resource path to copy
newPath
string - File resource path where copy/move. If it already exists, the process will create a new path (usually by adding a number before the extension)
move
boolean - If true, the original resource will be deleted. Default to false

Return Value

A Promise that resolves to a JSON object structured as follows:

newPath
The final path where the resource is copied.