appendfile
Appends data to a file in Workspace.
Syntax
Signature
appendfile(Path: string, Data: string) -> ()Aliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
Path | string | Path relative to the sandboxed Workspace. |
Data | string | Input bytes; binary strings are supported. |
Returns
| Type | Description |
|---|---|
() | None. |
Notes
The resulting file cannot exceed 16 MiB.
Example
Luau
local Path = "Examples/Log.txt"
writefile(Path, "Session started\n")
appendfile(Path, "First action\n")
appendfile(Path, "Second action\n")
print(readfile(Path))