Yuari
Documentation
Docs/File system/readfile

readfile

Reads a whole file and returns its contents as a string.

Syntax

readfile(path: string) -> string

Parameters

ParameterTypeDescription
pathstringA path inside the Yuari workspace.

Returns

TypeDescription
stringIts contents as a string

Description

readfile is part of the File system library. File functions are sandboxed to the executor workspace; paths outside it are rejected.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

Example

print(readfile("configs/aim.json"))

Notes

  • Paths are sandboxed to the executor workspace.