Skip to main content

deleteFolder

codebolt.fs.deleteFolder(foldername: string, folderpath: string): Promise<DeleteFolderResponse>

Parameters

NameTypeDescription
foldernamestringThe name of the folder to delete.
folderpathstringThe path of the folder to delete.

Returns:

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

Example

//Let's assume you want to delete a folder named oldFolder in the /home/user/documents directory.

codebolt.fs.deleteFolder('oldFolder', '/home/user/documents');

Explaination

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

foldername (string): The name of the folder to be deleted.

folderpath (string): The path to the directory where the folder is located.