Parameters
string
required
The file path, relative to the workspace folder.
string
required
The string to write.
Example
Errors
Related
appendfile: add without overwriting.readfile: read it back.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Write a string to a file.
writefile(path: string, contents: string) -> ()
writefile("config.json", game:GetService("HttpService"):JSONEncode(settings))
| Message | Condition |
|---|---|
argument 1 must be a string path | Argument 1 was not a string. |
argument 2 must be the string to write | Argument 2 was not a string. |
that file extension is not allowed in the workspace | The extension is not permitted. |
that path could not be written | The file could not be written. |
appendfile: add without overwriting.readfile: read it back.