-
Notifications
You must be signed in to change notification settings - Fork 0
queue API methods copy
hannsolo edited this page May 8, 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();
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();
The queue interface additionally offers the same methods as the client interface to move or copy individual files or directories during a queued operation:
copyFile(path: string, toPath: string, copyOptions?: ICopyOptions): Promise<boolean>
Copy a single file.
copyDirectory(path: string, toPath: string, listOptions: IListOptions = {}): Promise<boolean>
Copy a single directory to another location.
copyDirectoryContent(path: string, toPath: string, listOptions: IListOptions = {}): Promise<boolean>
Copy the content of a single directory to another location. This does NOT include the given directory itself.
moveFile(oldPath: string, newPath: string, copyOptions?: ICopyOptions): Promise<boolean>
Move a single file to a new location.
moveDirectory(oldPath: string, newPath: string, copyOptions?: ICopyOptions): Promise<boolean>
Move a single directory to a new location.
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.
Documentation
-
Interfaces