Home > DMT_Folder > getAllFoldersUuid
DMT_Folder.getAllFoldersUuid() method
Get the UUIDs of all folders
Signature
typescript
function getAllFoldersUuid(teamUuid: string): Promise<Array<string>>;1
Parameters
Parameter | Type | Description |
|---|---|---|
teamUuid | string | Team UUID |
Returns
Promise<Array<string>>
Folder UUID array
Remarks
This API ignores hierarchy information. It will return the UUIDs of folders at all levels and place them in a one-dimensional array
Example
javascript
// 1. 取当前工程所属团队
const projectInfo = await eda.dmt_Project.getCurrentProjectInfo();
const teamUuid = projectInfo.teamUuid;
// 2. 创建一个测试文件夹,保证列表里有新近创建的对象
const folderUuid = await eda.dmt_Folder.createFolder('嘉立创示例_盘点', teamUuid);
await new Promise(r => setTimeout(r, 1500));
// 3. 获取所有文件夹 UUID,确认测试文件夹在列
const allUuids = await eda.dmt_Folder.getAllFoldersUuid(teamUuid);
console.log('folderUuid:', folderUuid);
console.log('total folders:', allUuids.length);
console.log('test folder included:', allUuids.includes(folderUuid));
// 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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17