writefile
Writes a file, creating parent folders automatically. Raises an error on an invalid path, extension or size.
Syntax
writefile(path: string, data: string) -> nil
Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | A path inside the Yuari workspace. |
data | string | The data payload to process or send. |
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
writefile is part of the File system library. File functions are sandboxed to the executor workspace; paths outside it are rejected.
The change is applied directly to the live target, so later reads observe the updated value.
Example
writefile("configs/aim.json", '{"fov":15}')
Notes
- Paths are sandboxed to the executor workspace.