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

Method clearCache

lib/Epub/Epub.cpp:507–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507bool Epub::clearCache() const {
508 if (!Storage.exists(cachePath.c_str())) {
509 LOG_DBG("EPB", "Cache does not exist, no action needed");
510 return true;
511 }
512
513 if (!Storage.removeDir(cachePath.c_str())) {
514 LOG_ERR("EPB", "Failed to clear cache");
515 return false;
516 }
517
518 LOG_DBG("EPB", "Cache cleared successfully");
519 return true;
520}
521
522void Epub::setupCacheDir() const {
523 if (Storage.exists(cachePath.c_str())) {

Callers

nothing calls this directly

Calls 2

existsMethod · 0.80
removeDirMethod · 0.80

Tested by

no test coverage detected