File system
All file functions are sandboxed to the executor workspace: %LOCALAPPDATA%\Yuari\workspace. Paths outside the workspace (absolute paths, .. escapes) are rejected.
Limits. Allowed extensions:
.txt .lua .luau .json .cfg .dat .ini. Max file size: 8 MB. Max path length: 1024 characters.
Writes a file, creating parent folders automatically. Raises an error on an invalid path, extension or size.
writefile("configs/aim.json", '{"fov":15}')
Reads a whole file and returns its contents as a string.
print(readfile("configs/aim.json"))
Lists folder entries as sorted workspace-relative paths.
for _, path in ipairs(listfiles("configs")) do
print(path)
end
Compiles a file into a function with the Luau compatibility pass. Returns nil, message on failure.
local fn = loadfile("script.lua")
if fn then fn() end