Skip to content

fs_append

fs_append(filename, content) appends raw content to a file in the job’s directory. All writes are non-blocking and safe.

fs_append(filename, content)
async
Param Type Description
filename string File name (relative to job directory)
content string Content to append

None.

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 items
end