MCPcopy Create free account
hub / github.com/bdring/FluidNC / rehash_file

Method rehash_file

FluidNC/src/HashFS.cpp:81–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void HashFS::rehash_file(const std::filesystem::path& path, bool report) {
82 if (file_is_hashable(path)) {
83 std::string hash;
84 if (hashFile(path, hash) != Error::Ok) {
85 delete_file(path, false);
86 } else {
87 localFsHashes[path.filename().string()] = hash;
88 }
89 }
90 if (report) {
91 report_change();
92 }
93}
94void HashFS::rename_file(const std::filesystem::path& ipath, const std::filesystem::path& opath, bool report) {
95 delete_file(ipath, false);
96 rehash_file(opath, report);

Callers

nothing calls this directly

Calls 2

hashFileFunction · 0.85
stringMethod · 0.80

Tested by

no test coverage detected