Appearance
Function: moveFileOrFolder()
ts
function moveFileOrFolder(sourcePath: string, destinationPath: string): Promise<void>;Defined in: src/file/offerMwFile.tsx:299
Experimental
Move a file or folder to a new location.
Parameters
| Parameter | Type | Description |
|---|---|---|
sourcePath | string | Current path of the file or folder. |
destinationPath | string | New path for the file or folder. |
Returns
Promise<void>
Resolves when the move is complete.
Example
ts
await moveFileOrFolder(
'/Users/me/Desktop/todo.txt',
'/Users/me/Documents/todo.txt',
);
console.log('Moved todo list off the desktop');