write_file
Create or overwrite files by writing content to specified paths. Automatically generates missing directories to ensure file creation. Supports relative and absolute paths for flexible file management.
Instructions
Writes content to a specified file. Creates the file (and necessary directories) if it doesn't exist, or overwrites it if it does. Accepts relative or absolute paths (resolved like readFile).
Input Schema
Name | Required | Description | Default |
---|---|---|---|
content | Yes | The content to write to the file. If the file exists, it will be overwritten. | |
path | Yes | The path to the file to write. Can be relative or absolute. If relative, it resolves against the path set by `set_filesystem_default`. If absolute, it is used directly. Missing directories will be created. |