Commit 37433c91 authored by Roy Marmelstein's avatar Roy Marmelstein Committed by GitHub

Merge pull request #100 from jabez1314/master

support swift 4.0 
parents 8d1efb38 efbe72ce
......@@ -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