Namespace: fs
Table of contents
Functions
Functions
ListDir
▸ ListDir(path, itemType): string[] | null
ListDir lists itemType values within a directory
depending on the itemType provided
itemType can be any one of [‘file’,‘dir’,”]
Parameters
| Name | Type |
|---|---|
path | string |
itemType | string |
Returns
string[] | null
Example
Example
Example
Defined in
fs.ts:26ReadFile
▸ ReadFile(path): Uint8Array | null
ReadFile reads file contents within permitted paths
and returns content as byte array
Parameters
| Name | Type |
|---|---|
path | string |
Returns
Uint8Array | null
Example
Defined in
fs.ts:42ReadFileAsString
▸ ReadFileAsString(path): string | null
ReadFileAsString reads file contents within permitted paths
and returns content as string
Parameters
| Name | Type |
|---|---|
path | string |
Returns
string | null
Example
Defined in
fs.ts:58ReadFilesFromDir
▸ ReadFilesFromDir(dir): string[] | null
ReadFilesFromDir reads all files from a directory
and returns a string array with file contents of all files
Parameters
| Name | Type |
|---|---|
dir | string |
Returns
string[] | null
Example