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.
//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 2023-11-14 13:20:49 +0530 +0530