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

Method clearCache

lib/Txt/Txt.cpp:158–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158bool 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
173bool Txt::readContent(uint8_t* buffer, size_t offset, size_t length) const {
174 if (!loaded) {

Callers

nothing calls this directly

Calls 2

existsMethod · 0.80
removeDirMethod · 0.80

Tested by

no test coverage detected