Home > SYS_FileManager > getDocumentFootprintSources
SYS_FileManager.getDocumentFootprintSources() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Get the document footprint source code
Signature
typescript
function getDocumentFootprintSources(): Promise<
Array<{ footprintUuid: string; documentSource: string }>
>;1
2
3
2
3
Returns
Promise<Array<{ footprintUuid: string; documentSource: string }>>
Document footprint source code data. An empty array is returned if the data retrieval fails
Example
javascript
// 1. 获取当前文档全部封装源码
const sources = await eda.sys_FileManager.getDocumentFootprintSources();
// 2. 输出封装数量与每个封装的源码长度
console.log('封装数量:', sources.length);
sources.forEach((item, i) => {
console.log(`[${i}] footprintUuid:`, item.footprintUuid, '源码长度:', item.documentSource.length);
});1
2
3
4
5
6
7
8
2
3
4
5
6
7
8