Skip to main content

deleteFile

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

deleteFile

Parameters

ParameterTypeRequiredDescription
filenamestringYesThe name of the file to delete.
filePathstringYesThe path of the file to delete.

Returns

Promise<DeleteFileResponse> — A promise that resolves with the server response.

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.fs.deleteFile('filename', 'filePath');
console.log(result);