deleteFile
codebolt.fs.deleteFile(filename: string, filePath: string): Promise<DeleteFileResponse>
Deletes a file at the specified path.
Parameters
Name | Type | Description |
---|---|---|
filename | string | The name of the file to delete. |
filePath | string | The path of the file to delete. |
Returns:
Promise<DeleteFileResponse>
A promise that resolves with the server response.Example
// Let's assume you want to delete a file named example.txt in the /home/user/documents directory.
codebolt.fs.deleteFile('example.txt', '/home/user/documents');