AcediaDocumentation

writefile

Creates or replaces a workspace file.

Paths must remain inside the workspace. Writes to executable/script-launching and other blocked extensions are refused.

writefile(path: string, contents: string): ()

Parameters

ParameterTypeDescription
pathstringPath relative to the Acedia workspace.
contentsstringBytes to write.

Example

writefile("example.txt", "first version")

Errors: An invalid path or failed write raises an error.

Aliases: writefileasync.

On this page