Skip to content
File systemReference

writefile

Create or overwrite a workspace file.

Details#

Create or overwrite a workspace file. No return values.

Signature#

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

Parameters#

ParameterTypeDescription
pathstringUTF-8 path relative to the application's workspace.
datastringRaw bytes to write; must be a string.

Returns#

No return values.

Examples#

Local example

Luau
writefile("docs-example/note.txt", "First version")