MCPcopy Create free account
hub / github.com/Kitware/CMake / Load

Method Load

Source/cmFileTimeCache.cxx:13–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11cmFileTimeCache::~cmFileTimeCache() = default;
12
13bool cmFileTimeCache::Load(std::string const& fileName, cmFileTime& fileTime)
14{
15 // Use the stored time if available.
16 {
17 auto fit = this->Cache.find(fileName);
18 if (fit != this->Cache.end()) {
19 fileTime = fit->second;
20 return true;
21 }
22 }
23 // Read file time from OS
24 if (!fileTime.Load(fileName)) {
25 return false;
26 }
27 // Store file time in cache
28 this->Cache[fileName] = fileTime;
29 return true;
30}
31
32bool cmFileTimeCache::Remove(std::string const& fileName)
33{

Callers 2

CompareMethod · 0.95
DifferSMethod · 0.95

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected