This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public extension NSURL { | |
/// Creates a zip archive of the file/folder represented by this URL and returns a references to the zipped file | |
/// | |
/// - parameter dest: the destination URL; if nil, the destination will be this URL with ".zip" appended | |
func zip(dest: NSURL? = nil) throws -> NSURL { | |
let destURL = dest ?? self.URLByAppendingPathExtension("zip") | |
let fm = NSFileManager.defaultManager() | |
var isDir: ObjCBool = false |