▸ 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’,”]
Name | Type |
---|---|
path | string |
itemType | string |
string
[] | null
Example
Example
Example
fs.ts:26
▸ ReadFile(path
): Uint8Array
| null
ReadFile reads file contents within permitted paths and returns content as byte array
Name | Type |
---|---|
path | string |
Uint8Array
| null
Example
fs.ts:42
▸ ReadFileAsString(path
): string
| null
ReadFileAsString reads file contents within permitted paths and returns content as string
Name | Type |
---|---|
path | string |
string
| null
Example
fs.ts:58
▸ ReadFilesFromDir(dir
): string
[] | null
ReadFilesFromDir reads all files from a directory and returns a string array with file contents of all files
Name | Type |
---|---|
dir | string |
string
[] | null
Example
fs.ts:75
▸ 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’,”]
Name | Type |
---|---|
path | string |
itemType | string |
string
[] | null
Example
Example
Example
fs.ts:26
▸ ReadFile(path
): Uint8Array
| null
ReadFile reads file contents within permitted paths and returns content as byte array
Name | Type |
---|---|
path | string |
Uint8Array
| null
Example
fs.ts:42
▸ ReadFileAsString(path
): string
| null
ReadFileAsString reads file contents within permitted paths and returns content as string
Name | Type |
---|---|
path | string |
string
| null
Example
fs.ts:58
▸ ReadFilesFromDir(dir
): string
[] | null
ReadFilesFromDir reads all files from a directory and returns a string array with file contents of all files
Name | Type |
---|---|
dir | string |
string
[] | null
Example
fs.ts:75