Home > SYS_FileSystem > readFileFromFileSystem
SYS_FileSystem.readFileFromFileSystem() 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.
Read a file from the file system
Signature
typescript
function readFileFromFileSystem(uri: string): Promise<File | undefined>;1
Parameters
Parameter | Type | Description |
|---|---|---|
uri | string | File resource locator. An absolute path containing the complete file name is required |
Returns
Promise<File | undefined>
File format file
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