Yuari
Documentation
Docs/File system/writefile

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

ParameterTypeDescription
pathstringA path inside the Yuari workspace.
datastringThe data payload to process or send.

Returns

TypeDescription
nilThis 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.