appendfile Synchronous
appendfileasync
Add bytes to the end of a workspace file. It is a natural fit for a running log because existing entries stay in place.
Luau
appendfile(path: string, contents: string) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | Workspace-relative file path. |
contents | string | Text or binary bytes to add. |
Returns
()No values.
Usage notes
Include a newline yourself when entries should be on separate lines.
Differences from Volt
Volt documents access through explicitly created workspace symlinks. Kawaii rejects symlinks in workspace paths; all workspace operations remain subject to its path containment checks.
Example
Luau
local path = "session.log"
if not isfile(path) then writefile(path, "Session started\n") end
appendfile(path, "Settings opened\n")