Skip to main content

deleteFile

codebolt.fs.deleteFile(filename: string, filePath: string): Promise<DeleteFileResponse>

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

The codebolt.fs.deleteFile method is used to delete a specified file from a given directory. It has two parameters:

filename (string): The name of the file to be deleted, including the file extension (e.g., "example.txt", "data.json").

filePath (string): The path to the directory where the file is located.