| 156 | } |
| 157 | |
| 158 | bool Txt::clearCache() const { |
| 159 | if (!Storage.exists(cachePath.c_str())) { |
| 160 | LOG_DBG("TXT", "Cache does not exist, no action needed"); |
| 161 | return true; |
| 162 | } |
| 163 | |
| 164 | if (!Storage.removeDir(cachePath.c_str())) { |
| 165 | LOG_ERR("TXT", "Failed to clear cache"); |
| 166 | return false; |
| 167 | } |
| 168 | |
| 169 | LOG_DBG("TXT", "Cache cleared successfully"); |
| 170 | return true; |
| 171 | } |
| 172 | |
| 173 | bool Txt::readContent(uint8_t* buffer, size_t offset, size_t length) const { |
| 174 | if (!loaded) { |