Home > DMT_Folder > getFolderInfo
DMT_Folder.getFolderInfo() method
Get Folder detailed properties
Signature
typescript
function getFolderInfo(teamUuid: string, folderUuid: string): Promise<IDMT_FolderItem | undefined>;1
Parameters
Parameter | Type | Description |
|---|---|---|
teamUuid | string | Team UUID |
folderUuid | string | Folder UUID |
Returns
Promise<IDMT_FolderItem | undefined>
Folder property; if it is undefined, the retrieval failed
Remarks
When parentFolderUuid equals teamUuid, it means the current folder is a first-level folder under the specified team
Example
javascript
// 1. 取当前工程所属团队
const projectInfo = await eda.dmt_Project.getCurrentProjectInfo();
const teamUuid = projectInfo.teamUuid;
// 2. 创建带描述的测试文件夹,等 1.5s 让工作区同步
const folderUuid = await eda.dmt_Folder.createFolder('嘉立创示例_查询', teamUuid, undefined, '嘉立创示例:初始描述');
await new Promise(r => setTimeout(r, 1500));
// 3. 查询文件夹详细属性
const folderInfo = await eda.dmt_Folder.getFolderInfo(teamUuid, folderUuid);
console.log('folderUuid:', folderUuid);
console.log('folderInfo:', JSON.stringify({
name: folderInfo?.name,
description: folderInfo?.description,
parentFolderUuid: folderInfo?.parentFolderUuid,
teamUuid: folderInfo?.teamUuid,
}));
// 4. 清理测试文件夹(查询类案例不留测试对象)
await eda.dmt_Folder.deleteFolder(teamUuid, folderUuid);1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21