Commit 4a71be9c authored by jabez's avatar jabez

support swift 4.0

parent 6e16483d
......@@ -165,8 +165,15 @@ public class Zip {
let fullPath = destination.appendingPathComponent(pathString).path
let creationDate = Date()
let directoryAttributes = [FileAttributeKey.creationDate.rawValue : creationDate,
FileAttributeKey.modificationDate.rawValue : creationDate]
#if swift(>=4.0)
let directoryAttributes = [FileAttributeKey.creationDate : creationDate,
FileAttributeKey.modificationDate : creationDate]
#else
let directoryAttributes = [FileAttributeKey.creationDate.rawValue : creationDate,
FileAttributeKey.modificationDate.rawValue : creationDate]
#endif
do {
if isDirectory {
try fileManager.createDirectory(atPath: fullPath, withIntermediateDirectories: true, attributes: directoryAttributes)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment