Skip to content

Filesystem

The FileSystem module enables reading file functionality in the stb file system.

Methods

readAllText(path)

Open and read the contents of a file on a specified path

Parameters:

Name Type Description
path MRL Path of the file to read.

Returns:

Type Description
A promise. The listener will be passed the following arguments:
- data: A string containing the contents of the file.

writeText(filename, text)

Write text content to the specified path.

Parameters:

Name Type Description
filename The name of the target text file.
text The text content to be written.

Returns:

Type Description
A promise. The listener will be passed the following arguments:
- path: A string containing the full path of the written file.
Back to top