button to clear app cached files
This commit is contained in:
1 parent
67c3fdb36a
commit
7c0cb386a7
2 files changed
+32
No files matched your search
@@ -150,4 +150,11 @@ class PosterBoardManager {
|
||||
try? FileManager.default.removeItem(at: descriptors)
|
||||
}
|
||||
}
|
||||
|
||||
static func clearCache() throws {
|
||||
let docDir = SymHandler.getDocumentsDirectory()
|
||||
for file in try FileManager.default.contentsOfDirectory(at: docDir, includingPropertiesForKeys: nil) {
|
||||
try FileManager.default.removeItem(at: file)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user