summaryrefslogtreecommitdiff
path: root/filecache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'filecache.cpp')
-rw-r--r--filecache.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/filecache.cpp b/filecache.cpp
index 9f9f718..c0b2f36 100644
--- a/filecache.cpp
+++ b/filecache.cpp
@@ -17,6 +17,11 @@ Cache::~Cache() {
fprintf(stderr, "error removing tmp dir\n");
}
+void Cache::ClearCache() {
+ for (const auto &path : std::filesystem::directory_iterator(m_tmp_path))
+ std::filesystem::remove_all(path);
+}
+
std::string Cache::GetCachedName(std::string str) {
uint32_t out;
MurmurHash3_x86_32(str.c_str(), str.size(), 0, &out);