write_file
Write or overwrite a file in the WSL filesystem with provided content, creating the file if needed. Requires the parent directory to exist.
Instructions
Write or overwrite a file in the WSL filesystem with the provided content. Creates the file if it does not exist; overwrites it if it does. The parent directory must already exist. Use run_command with mkdir -p to create missing directories first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path where the file should be written within the WSL filesystem, e.g. '/home/user/project/script.sh'. | |
| distro | No | Name of the WSL distribution. Defaults to the system default distribution. | |
| content | Yes | The UTF-8 text content to write to the file. |