Skip to main content

deleteFile

codebolt.fs.deleteFile(filename: string, filePath: string): Promise<DeleteFileResponse>
Deletes a file at the specified path.

Parameters

NameTypeDescription
filenamestringThe name of the file to delete.
filePathstringThe 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');