Get Folder Details
To use the Stratus component in the Early Access mode, email us at support@zohocatalyst.com.
You can retrieve the metadata of the folders created in the Catalyst File Store. You can get the details of a specific folder in the File Store of your project, or the details of all the folders in your project.
Get Details of a Specific Folder
You can obtain the details of a specific folder by creating a folder instance as mentioned here. You will need to fetch the File Store instance first, and use it to fetch the folder instance.
Ensure the following packages are imported:
copy
import com.zc.component.files.ZCFile;
import com.zc.component.files.ZCFolder;
You can refer to the specific folder whose metadata you require to be fetched in two ways:
Refer to the Folder by its ID
You can specify the unique Folder ID of the folder to be fetched to the getFolder() method, as shown below.
copy
//Get an instance of the File Store
ZCFile fileStore = ZCFile.getInstance();
//Get Folder Details by passing the Folder ID
ZCFolder folderDetails = fileStore.getFolder(1510000000109393L);
Refer to the Folder by its Name
You can specify the name of the folder to be fetched to the getFolder() method, as shown below.
copy
//Get an instance of the File Store
ZCFile fileStore = ZCFile.getInstance();
//Get Folder Details by passing the folder name
ZCFolder folderDetails = fileStore.getFolder("EmpDetails");
Get Details of All Folders
If you want to fetch the details of all the folders in your Catalyst project, use the following variant of the getFolder() method:
Ensure the following packages are imported:
copy
import com.zc.component.files.ZCFile;
import com.zc.component.files.ZCFolder;
copy
//Get an instance for the file store
ZCFile fileStore = ZCFile.getInstance();
//Get All the folders in the project
List<ZCFolder>folderDetails = fileStore.getFolder();
Last Updated 2025-02-24 14:38:44 +0530 +0530
Yes
No
Send your feedback to us