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)
| 759 | /// |
| 760 | /// The Blake3 hash of the file contents. |
| 761 | pub fn hash_file_contents(path: &Path) -> StatusResult<Hash> { |
| 762 | let contents = std::fs::read(path)?; |
| 763 | Ok(Hash::of(&contents)) |
| 764 | } |
| 765 | |
| 766 | /// Collect all files in a directory, respecting ignore patterns. |
| 767 | /// |
no outgoing calls