Retrieve the folder details

You can retrieve the details of folders created in the file store. There are several ways of doing this.

Get the details of all the 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:

Copiedimport com.zc.component.files.ZCFile;
import com.zc.component.files.ZCFolder;
Copied//Get an instance for the file store
ZCFile fileStore = ZCFile.getInstance();
//Get All the folders in the project
List&ltZCFolder&gt folderDetails = fileStore.getFolder();

Get the details of a single folder

This variant retrieves the details of a specific folder via its unique Folder ID by calling the getFolder() method.

Ensure the following packages are imported:

Copiedimport com.zc.component.files.ZCFile;
import com.zc.component.files.ZCFolder;
Copied//Get an instance for the file store
ZCFile fileStore = ZCFile.getInstance();
//Get Folder Details using Folder ID
ZCFolder folderDetails = fileStore.getFolder(1510000000109393L);