writefile
Creates or replaces a workspace file. Existing contents are replaced rather than appended. Create parent folders first with makefolder.
Syntax
writefile(path: string, data: string) -> ()
Also available as
write_file
Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | Workspace-relative destination. |
data | string | Bytes to write. |
Description
File operations are confined to the current workspace. Absolute paths and traversal outside it are not accepted. Use a file dialog when the user needs to choose an external file.
Example
writefile("example.txt", "hello")
These are Game executor contracts. Check build requirements and session lifetimes before using them.
