Delete a file

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 2023-09-03 01:06:41 +0530 +0530

ON THIS PAGE