hash_directories

Function hash_directories 

Source
pub fn hash_directories(paths: Vec<PathBuf>) -> Result<Vec<u8>, HashError>
Expand description

Given a list of directory paths, computes their directory hash and returns it as a byte array.

This function is equivalent to calling hash_directory on each directory in turn, concatenating all those hashes with the NodeType::DirSeparator byte, then hashing the result. The input does not have to be sorted, but will be sorted prior to hashing, in order to ensure quirks of calling this function won’t result in inconsistent results.

If the input is a singleton vector, i.e. a vector with only one element, calling this function is equivalent to calling hash_directory on that element. If the input is an empty vector, the null-hash is returned.