Summary
Calculates the hash for a given directory.
Syntax
[CakeMethodAlias]
public static DirectoryHash CalculateDirectoryHash(this ICakeContext context, DirectoryPath directoryPath, IEnumerable<string> globs, 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());
Attributes
Parameters
| Name |
Type |
Description |
| context |
ICakeContext |
The context. |
| directoryPath |
DirectoryPath |
The file path. |
| globs |
IEnumerable<string> |
The glob pattern to match. |
| hashAlgorithm |
HashAlgorithm |
The hash algorithm to use. |
Return Value