Appearance
Function: deleteFileOrFolder()
ts
function deleteFileOrFolder(targetPath: string): Promise<void>;Defined in: src/file/offerMwFile.tsx:400
Experimental
Delete a file or folder.
Parameters
| Parameter | Type | Description |
|---|---|---|
targetPath | string | Path 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');