Delete a File
The delete() method is used to delete a file from the folder. The file used in the code snippet below is the file object.
Note : The promise returned here will be resolved to an object in which the content key contains the deleted file details.
copy
//Delete the file by calling the method which returns a promise.
var filestore = catalyst.file;
var folder = filestore.folderId(FOLDER_ID);
var file = folder.fileId(FILE_ID);
var deletePromise = file.delete(); deletePromise
.then((response) => { console.log(response.content); }) .catch((err) => { console.log(err); });
Last Updated 2025-08-28 12:01:44 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit