Writes Lua string bytes to a file inside the workspace, creating missing parent directories and replacing the file contents if the file already exists.
Writes Lua string bytes to a file inside the workspace, creating missing parent directories and replacing the file contents if the file already exists.
File path resolved inside the workspace after separator normalization, workspace-boundary checks, and filename/extension checks. Absolute paths are accepted only if they resolve inside the workspace.
content
string
Yes
Lua string bytes to write. The data is written in binary truncate mode; writefile does not add newlines, BOM bytes, null terminators, or other extra bytes.