Skip to content

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

ParameterTypeDescription
sourcePathstringCurrent path of the file or folder.
destinationPathstringNew 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');

Matterway Assistant SDK Documentation