patch_text_file_contents
Modify text files by applying patches with hash-based validation for concurrency control. Ensure file integrity by using hash values to verify content changes, enabling precise updates to specific line ranges.
Instructions
Apply patches to text files with hash-based validation for concurrency control.you need to use get_text_file_contents tool to get the file hash and range hash every time before using this tool. you can use append_text_file_contents tool to append text contents to the file without range hash, start and end. you can use insert_text_file_contents tool to insert text contents to the file without range hash, start and end.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
encoding | No | Text encoding (default: 'utf-8') | utf-8 |
file_hash | Yes | Hash of the file contents for concurrency control. | |
file_path | Yes | Path to the text file. File path must be absolute. | |
patches | Yes | List of patches to apply |