AcediaDocumentation

readfile

Reads a workspace file as a binary-safe string.

Missing or unreadable files raise an error. Paths stay inside the workspace; see Filesystem for the path rules.

readfile(path: string): string

Parameters

ParameterTypeDescription
pathstringPath relative to the Acedia workspace.

Example

writefile("example.txt", "hello")
print(readfile("example.txt"))

Example output

hello

Aliases: readfileasync.

On this page