deleteFile
Requires a Node.js runtime ('qsu/node')Delete files or directory in the specified path. If the file does not exist in the path, it is ignored.
This method also supports deleting directory paths. If files exist within the directory, they are included and removed.
A symlink is unlinked, never followed, so the directory it points at is left alone. A path that is empty or nothing but whitespace does nothing.
Parameters
| Name | Type | Required | Default |
|---|---|---|---|
filePath | stringStringstr | ● | – |
| File or directory path | |||
Returns
Promise<void>
Future<void>
None
Examples
javascript
await deleteFile('/home/user/text.txt');dart
await deleteFile('/home/user/text.txt');python
deleteFile('/home/user/text.txt')