From 522bc5d9cb34a7de658eee3ae4c4138dbccfb6d5 Mon Sep 17 00:00:00 2001 From: mayur nilwant Date: Mon, 10 Jun 2024 06:36:15 -0400 Subject: [PATCH] Added method for AppUpgrate call to delete AppLevel directory. --- MVMCore/MVMCore/OtherHandlers/MVMCoreCache+Extension.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MVMCore/MVMCore/OtherHandlers/MVMCoreCache+Extension.swift b/MVMCore/MVMCore/OtherHandlers/MVMCoreCache+Extension.swift index 3522b3a..c87d84a 100644 --- a/MVMCore/MVMCore/OtherHandlers/MVMCoreCache+Extension.swift +++ b/MVMCore/MVMCore/OtherHandlers/MVMCoreCache+Extension.swift @@ -106,4 +106,8 @@ public class CachedData: Codable { private func filePath(forKey key: String) -> URL { return cacheDirectory.appendingPathComponent("\(key).json") } + + @objc public func removeAllAppLevel() throws { + try FileManager.default.removeItem(at: appLevelCacheDirectory) + } }