| 505 | } |
| 506 | |
| 507 | bool 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 | |
| 522 | void Epub::setupCacheDir() const { |
| 523 | if (Storage.exists(cachePath.c_str())) { |