MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / pruneMissing

Method pruneMissing

src/RecentBooksStore.cpp:89–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87bool RecentBooksStore::isMissing(const RecentBook& book) { return !Storage.exists(book.path.c_str()); }
88
89bool RecentBooksStore::pruneMissing() {
90 const size_t before = recentBooks.size();
91 recentBooks.erase(std::remove_if(recentBooks.begin(), recentBooks.end(), &isMissing), recentBooks.end());
92 return recentBooks.size() != before;
93}
94
95bool RecentBooksStore::saveToFile() const {
96 Storage.mkdir("/.crosspoint");

Callers 1

onEnterMethod · 0.80

Calls 3

endMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected