fs_append
fs_append(filename, content) appends raw content to a file in the job’s directory. All writes are non-blocking and safe.
Signature
Section titled “Signature”fs_append(filename, content)
asyncParameters
Section titled “Parameters”| Param | Type | Description |
|---|---|---|
filename |
string | File name (relative to job directory) |
content |
string | Content to append |
Returns
Section titled “Returns”None.
Example
Section titled “Example”function after_extract(items, ctx) for _, item in ipairs(items) do local row = string.format("%s,%s\n", item.fields.title, item.fields.price) fs_append("data.csv", row) end return itemsendSee Also
Section titled “See Also”- fs_overwrite - Replace entire file content
- fs_read - Read file content