file.replace
Replace the full content of a vault file, using a content hash to ensure safe updates and avoid conflicts.
Instructions
HEAVY: replace the entire content of a file. Prefer str_replace / apply_patch / heading.replace_body / block.replace / frontmatter.set / lines.replace for surgical edits. Requires expected_content_hash unless create_if_missing is true and the file does not exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| vault | No | ||
| content | Yes | ||
| dry_run | No | ||
| create_if_missing | No | ||
| expected_content_hash | No |