ReferenceFilesystem

appendfile

Appends bytes to a workspace file, creating the file when needed. It does not insert a line break; include one in contents when writing lines.

Syntax

appendfile(path: string, contents: string) -> ()

Also available as

append_file

Parameters

ParameterTypeDescription
pathstringWorkspace-relative file.
contentsstringBytes to append.

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

appendfile("events.txt", "started\n")

These are Game executor contracts. Check build requirements and session lifetimes before using them.