write_file
Create a new file or replace an existing one only when the current SHA-256 matches the expected hash. This prevents overwriting files that changed after you inspected them.
Instructions
Create a file with expected_sha256=null, or replace one only if the current SHA-256 matches. Changes actual files. Parent must exist. Does not follow a final symlink.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| content | Yes | ||
| encoding | No | utf8 | |
| expected_sha256 | Yes |