Get folder detail

This method is used to get folder detail by the path which can access the folder.

Use the method getFileListByFolder()

Syntax

The syntax of this method is like the syntax of the method getFileListByFolder().

Example

Assuming that we have a path structure like Folder1/Folder2/Folder3 in a project with id 112. The example below shows how to get Folder2 detail.

import { getFilesListByFolder } from "@eueno/lib-browser";
const getFolderDetail = async () => {
   const projectId =112”;
   const path = “Folder1/Folder2”;	
   const res = await getFilesListByFolder(projectId, path);
   console.log(res);
};

Response of example:

{
    "msg": "success",
    "data": {
        "folders": [
            "Folder3"
        ],
        "files": []
    },
    "options": {
        "totalItem": 1
    }
}

The response indicates that Folder2 has totalItem 1 includes: one folder named “Folder3” and no file.

Last updated