Skip to content

Function: deleteFileOrFolder()

ts
function deleteFileOrFolder(targetPath: string): Promise<void>;

Defined in: src/file/offerMwFile.tsx:400

Experimental

Delete a file or folder.

Parameters

ParameterTypeDescription
targetPathstringPath to the file or folder to delete.

Returns

Promise<void>

Resolves when the deletion is complete.

Example

ts
await deleteFileOrFolder('/Users/me/Downloads/temp-archive.zip');
console.log('Cleaned up the temp archive');

Matterway Assistant SDK Documentation