append_file
Append text content to a file, creating it if missing. Specify path, content, and optional encoding to update logs, CSV, or other files.
Instructions
Append content to an existing file (or create it if it does not exist).
Args:
path: Path to the file.
content: Content to append.
encoding: File encoding. Default: "utf-8".
Returns:
A dict with keys: status, data (path, total_size_bytes).
Examples:
append_file("log.txt", "New entry
") append_file("output.csv", "row1,row2 ")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| encoding | No | utf-8 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||