Write text file
nekoweb_write_fileWrites complete text content to a Nekoweb site file, creating or replacing it, or editing an existing file. Use it for full HTML, CSS, or other UTF-8 text updates; partial edits are not supported.
Instructions
Write text content to a file on your Nekoweb site, creating it or replacing its entire content.
mode='create_or_overwrite' (default) uploads the file whether or not it exists; the parent folder must already exist (create it with nekoweb_create). mode='edit_existing' only changes a file that already exists.
Always send the complete new file content; there is no partial update. For binary or local files, use nekoweb_upload_file.
Examples:
"Change my homepage title" -> read it with nekoweb_read_file, then { path: "/mysite.nekoweb.org/index.html", content: "" }
"Add a stylesheet" -> { path: "/mysite.nekoweb.org/css/style.css", content: "body { ... }" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'create_or_overwrite' (default) writes the file whether or not it exists; 'edit_existing' fails if it doesn't | create_or_overwrite |
| path | Yes | Path from the account's file root, including the site folder, e.g. '/mysite.nekoweb.org/index.html' | |
| content | Yes | The complete new content of the file (UTF-8 text) |