File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Source/Shared/Configuration Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public struct DiskConfig {
1010 public let maxSize : UInt
1111 /// A folder to store the disk cache contents. Defaults to a prefixed directory in Caches if nil
1212 public let directory : URL ?
13+ #if os(iOS) || os(tvOS)
1314 /// Data protection is used to store files in an encrypted format on disk and to decrypt them on demand.
1415 /// Support only on iOS and tvOS.
1516 public let protectionType : FileProtectionType ?
@@ -23,4 +24,14 @@ public struct DiskConfig {
2324 self . directory = directory
2425 self . protectionType = protectionType
2526 }
27+ #else
28+ public init ( name: String , expiry: Expiry = . never,
29+ maxSize: UInt = 0 , directory: URL ? = nil ) {
30+ self . name = name
31+ self . expiry = expiry
32+ self . maxSize = maxSize
33+ self . directory = directory
34+ self . protectionType = protectionType
35+ }
36+ #endif
2637}
You can’t perform that action at this time.
0 commit comments