readfile
Reads a whole file and returns its contents as a string.
Syntax
readfile(path: string) -> string
Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | A path inside the Yuari workspace. |
Returns
| Type | Description |
|---|---|
string | Its 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.