Skip to content
File systemReference

appendfile

Append bytes to a workspace file.

Details#

Append bytes to a workspace file. No return values.

Signature#

Luau
appendfile(path: string, data: string): ()

Parameters#

ParameterTypeDescription
pathstringUTF-8 path relative to the application's workspace.
datastringBytes appended to the end; no automatic newline.

Returns#

No return values.

Examples#

Local example

Luau
writefile("docs-example/log.txt", "first\n")
appendfile("docs-example/log.txt", "second\n")