Hash the contents of a file using Blake3. This is used to compute content hashes for modification detection. # Arguments `path` - Path to the file to hash # Returns The Blake3 hash of the file contents.
(path: &Path)
| 747 | /// |
| 748 | /// The Blake3 hash of the file contents. |
| 749 | pub fn hash_file_contents(path: &Path) -> StatusResult<Hash> { |
| 750 | let contents = std::fs::read(path)?; |
| 751 | Ok(Hash::of(&contents)) |
| 752 | } |
| 753 | |
| 754 | /// Collect all files in a directory, respecting ignore patterns. |
| 755 | /// |
no outgoing calls