This commit is contained in:
Your Name
2025-04-28 21:54:11 +12:00
parent 95e705b426
commit 320fd1f3f0
3 changed files with 17 additions and 7 deletions

View File

@@ -106,4 +106,14 @@ void hash_demo(const std::string & path)
std::cout << "Hash: " << hash << " (took " << duration.count() << "ms)" << std::endl;
}
int hash_demo_raw(const std::string & path)
{
if (!std::filesystem::exists(path)) {
std::cout << 0 <<std::endl; return 1;
}
XXH64_hash_t hash = hash_directory_recursive(path);
std::cout << hash << std::endl;
return 0;
}
} // namespace dropshell

View File

@@ -12,6 +12,8 @@ namespace dropshell {
void hash_demo(const std::string & path);
int hash_demo_raw(const std::string & path);
} // namespace dropshell