mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Improve internal API docs for two file hashing functions
Co-Authored-By: Matthew Bauer <mjbauer95@gmail.com> Co-Authored-By: Carlo Nucera <carlo.nucera@protonmail.com>
This commit is contained in:
parent
f89b84919c
commit
39ba81a4eb
1 changed files with 7 additions and 3 deletions
|
@ -145,13 +145,17 @@ std::string printHash16or32(const Hash & hash);
|
|||
Hash hashString(HashType ht, std::string_view s);
|
||||
|
||||
/**
|
||||
* Compute the hash of the given file.
|
||||
* Compute the hash of the given file, hashing its contents directly.
|
||||
*
|
||||
* (Metadata, such as the executable permission bit, is ignored.)
|
||||
*/
|
||||
Hash hashFile(HashType ht, const Path & path);
|
||||
|
||||
/**
|
||||
* Compute the hash of the given path. The hash is defined as
|
||||
* (essentially) hashString(ht, dumpPath(path)).
|
||||
* Compute the hash of the given path, serializing as a Nix Archive and
|
||||
* then hashing that.
|
||||
*
|
||||
* The hash is defined as (essentially) hashString(ht, dumpPath(path)).
|
||||
*/
|
||||
typedef std::pair<Hash, uint64_t> HashResult;
|
||||
HashResult hashPath(HashType ht, const Path & path,
|
||||
|
|
Loading…
Reference in a new issue