Awee

file:write

Writes or appends content to a file, optionally deleting it first

Writes or appends content to a file, optionally deleting it first

Options

NameTypeDescription
pathstringDestination file path
appendboolWhen true, content is appended to the existing file instead of overwriting
contentanyThe content to write; must be a string or []byte
deleteboolWhen true, deletes the file before writing (ignored when Append is true)

Outputs

NameTypeDescription
pathstringThe path of the written file

How is this guide?

On this page