Skip to content

queue API methods copy

Steve edited this page Apr 29, 2020 · 2 revisions

batchCopy(targetPath: string, options: ICopyOptions): void ~> Promise <boolean>

Copies all files and folders currently collected in the queue to the given target directory.

See ICopyOptions on possibilities to handle existing files in the target path.

queue.login("user", "password");
queue.listServer("some/path", { recursive:true });
queue.batchCopy("target/path");
queue.logout();
queue.run();

batchMove(newPath: string): void ~> Promise <boolean>

Move all files and folders currently collected in the queue to the given target directory.

queue.login("user", "password");
queue.listServer("some/path", { recursive:true });
queue.batchMove("target/path");
queue.logout();
queue.run();

Note: the methods above just add the commands to the queue. Execution starts when calling queue.run() or queue.runWithResults(). The ~> indicates the result type.
Clone this wiki locally