| 87 | bool RecentBooksStore::isMissing(const RecentBook& book) { return !Storage.exists(book.path.c_str()); } |
| 88 | |
| 89 | bool 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 | |
| 95 | bool RecentBooksStore::saveToFile() const { |
| 96 | Storage.mkdir("/.crosspoint"); |