File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,15 @@ public class Zip {
165
165
let fullPath = destination. appendingPathComponent ( pathString) . path
166
166
167
167
let creationDate = Date ( )
168
- let directoryAttributes = [ FileAttributeKey . creationDate. rawValue : creationDate,
169
- FileAttributeKey . modificationDate. rawValue : creationDate]
168
+
169
+ #if swift(>=4.0)
170
+ let directoryAttributes = [ FileAttributeKey . creationDate : creationDate,
171
+ FileAttributeKey . modificationDate : creationDate]
172
+ #else
173
+ let directoryAttributes = [ FileAttributeKey . creationDate. rawValue : creationDate,
174
+ FileAttributeKey . modificationDate. rawValue : creationDate]
175
+ #endif
176
+
170
177
do {
171
178
if isDirectory {
172
179
try fileManager. createDirectory ( atPath: fullPath, withIntermediateDirectories: true , attributes: directoryAttributes)
You can’t perform that action at this time.
0 commit comments