Delete a file

Note: Catalyst now offers you a brand new object storage component called Stratus in Early Access mode. This component is a significant upgrade to the current Cloud Scale File Store component. You can find out more about the Stratus component here.

To use the Stratus component in the Early Access mode, email us at support@zohocatalyst.com.

A file can be deleted from a folder using the following code snippet.

Note : File once deleted will not be restored.

Ensure the following packages are imported:

    
copy
import com.zc.component.files.ZCFile; import com.zc.component.files.ZCFolder;
    
copy
//Get a file store instance ZCFile fileStore = ZCFile.getInstance(); //Get a folder Instance ZCFolder folder = fileStore.getFolderInstance(704000000116007l); //Deletes the file by referring to its ID folder.deleteFile(704000000122001l);

Last Updated 2025-02-24 14:38:44 +0530 +0530

ON THIS PAGE
ACCESS THIS PAGE