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

Method hash

FluidNC/src/HashFS.cpp:119–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 }
118}
119std::string HashFS::hash(const std::filesystem::path& path, bool useCacheOnly /*= false*/) {
120 if (file_is_hashable(path)) {
121 std::map<std::string, std::string>::const_iterator it;
122 it = localFsHashes.find(path.filename().string());
123 if (it != localFsHashes.end()) {
124 return it->second;
125 }
126 } else if (!useCacheOnly) {
127 std::string theHash;
128 hashFile(path, theHash);
129 return theHash;
130 }
131 return std::string();
132}

Callers

nothing calls this directly

Calls 4

hashFileFunction · 0.85
stringMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected