Skip to main content

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

Returns

string[] | null Example
Example
Example

Defined in

fs.ts:26

ReadFile

ReadFile(path): Uint8Array | null ReadFile reads file contents within permitted paths and returns content as byte array

Parameters

Returns

Uint8Array | null Example

Defined in

fs.ts:42

ReadFileAsString

ReadFileAsString(path): string | null ReadFileAsString reads file contents within permitted paths and returns content as string

Parameters

Returns

string | null Example

Defined in

fs.ts:58

ReadFilesFromDir

ReadFilesFromDir(dir): string[] | null ReadFilesFromDir reads all files from a directory and returns a string array with file contents of all files

Parameters

Returns

string[] | null Example

Defined in

fs.ts:75