Summary
Calculates the hash for a given directory.
Syntax
public DirectoryHash Calculate(DirectoryPath directoryPath, IEnumerable<string> pattern, HashAlgorithm hashAlgorithm)
Examples
Information(
"Cake It calculates the hashes from all cs files in all subdirectories using a MD5 hash: {0}",
CalculateDirectoryHash("C:\directoryToHash", "./**/*.cs", HashAlgorithm.MD5).ToHex());
Parameters
Name |
Type |
Description |
directoryPath |
DirectoryPath |
The directory path. |
pattern |
IEnumerable<string> |
The glob pattern to match. |
hashAlgorithm |
HashAlgorithm |
The hash algorithm to use. |
Return Value