Home > SYS_FileSystem > listFilesOfFileSystem
SYS_FileSystem.listFilesOfFileSystem() 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.
View the file list under a file system path
Signature
typescript
function listFilesOfFileSystem(
folderPath: string,
recursive?: boolean,
): Promise<Array<ISYS_FileSystemFileList>>;1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
|---|---|---|
folderPath | string | Directory path |
recursive | boolean | (Optional) Whether to recursively get all sub-files |
Returns
Promise<Array<ISYS_FileSystemFileList>>
File list in the current directory
Remarks
Note 1: This API is only valid for clients. Calling it in a browser environment will always throw Error
Note 2: This API requires the user to enable the extension external interaction permission, if not enabled, it will always throw Error