write_file
Write a file in a WSL distribution with automatic parent directory creation, text or base64 encoding, and optional SHA-256 hash for data verification.
Instructions
Write a file in WSL. content is UTF-8 text by default; set encoding="base64" for binary content. Creates parent directories as needed. sha256=true returns a hash of the written bytes for round-trip verification.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| distro | No | ||
| sha256 | No | Return sha256 (hex) of the written bytes | |
| content | Yes | ||
| encoding | No | Default "text" |