deleteFolder
codebolt.fs.deleteFolder(foldername: string, folderpath: string): Promise<DeleteFolderResponse>
Parameters
Name | Type | Description |
---|---|---|
foldername | string | The name of the folder to delete. |
folderpath | string | The 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.