Added ifFileExistsForPageType function.
This commit is contained in:
parent
2b8bd98bf0
commit
9e520a9b87
@ -110,4 +110,14 @@ public class CachedData: Codable {
|
||||
@objc public func removeAllAppLevel() throws {
|
||||
try FileManager.default.removeItem(at: appLevelCacheDirectory)
|
||||
}
|
||||
|
||||
@objc public func ifFileExistsForPageType(path: URL) -> Bool {
|
||||
|
||||
if #available(iOS 16.0, *) {
|
||||
return FileManager.default.fileExists(atPath: path.path())
|
||||
} else {
|
||||
|
||||
return FileManager.default.fileExists(atPath: path.absoluteURL.path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user