Skip to content
IonizeDocsionize.cc ↗

API Reference

FileSystem Library

Reading and writing files inside the executor workspace directory.

11 members

readfile(path: string): string

Returns the contents of a file.

writefile(path: string, contents: string): ()

Writes contents to a file, replacing it if present.

appendfile(path: string, contents: string): ()

Appends contents to the end of a file.

listfiles(path: string): { string }

Returns the entries inside a folder.

isfile(path: string): boolean

Returns whether the path is a file.

isfolder(path: string): boolean

Returns whether the path is a folder.

makefolder(path: string): ()

Creates a folder.

delfile(path: string): ()

Deletes a file.

delfolder(path: string): ()

Deletes a folder and its contents.

loadfile(path: string, chunkName: string?): (function?, string?)

Compiles a file and returns the resulting function.

dofile(path: string): ()

Compiles and runs a file.