File Store

Catalyst File Store provides cloud storage solutions for the application files and user data files of your Catalyst application, and enables access to shared data. You can store, manage, and organize images, videos, text files, document files, spreadsheets, or files of other formats.

Create a Folder Instance

You can create an empty folder instance and use it to refer to a specific folder in the File Store and perform file operations on it. This is done by fetching the File Store instance with the getInstance() method, and using it to fetch the folder instance with the getFolderInstance() method.

You can refer to the specific folder you need to create the folder instance for, by either its unique ID or by its name, as shown below.

Ensure the following packages are imported:

    
copy
import com.zc.component.files.ZCFile; import com.zc.component.files.ZCFolder;

Fetch the Folder Instance using the Folder ID

    
copy
//Fetch an instance of the file store ZCFile fileStore = ZCFile.getInstance(); //Use the File Store instance to fetch the Folder Instance of a specific folder by referring to its ID ZCFolder folderDetails = fileStore.getFolderInstance(1510000000109393L);

Fetch the Folder Instance using the Folder Name

    
copy
//Fetch an instance of the file store ZCFile fileStore = ZCFile.getInstance(); //Use the File Store instance to fetch the Folder Instance of a specific folder by referring to its name ZCFolder folderDetails = fileStore.getFolderInstance("EmpDetails");

Last Updated 2024-01-04 12:37:42 +0530 +0530