Syntax
writefile(path: string, content: string)Aliases
writefileasyncArguments
| Name | Type | Description |
|---|---|---|
path | string | Workspace-relative path to the file or folder. |
content | string | Text or byte string to write. |
Description
Writes content to a workspace file, replacing the file if it already exists.
Call it with 2 parameter(s): path, content. The argument table explains which values are required and which ones only refine the behavior.
It does not return data. Treat the call as an action and handle errors around the call site when needed.
Example
Write text to a workspace-relative file.
makefolder("workspace/examples")
writefile("workspace/examples/config.json", '{"enabled":true}')