From 23efb89d1fea250b2805e058d07595c782bd2975 Mon Sep 17 00:00:00 2001 From: Roy Marmelstein Date: Tue, 19 Jan 2016 20:59:31 +0100 Subject: [PATCH] Updating readme to reflect class new nicer syntax --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cac1b31..0fc08ed 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ The easiest way to use Zip is through quick functions. Both take local file path ```swift do { let filePath = NSBundle.mainBundle().URLForResource("file", withExtension: "zip")! - let unzipDirectory = try Zip().quickUnzipFile(filePath) // Unzip - let zipFilePath = try Zip().quickZipFiles([filePath], fileName: "archive") // Zip + let unzipDirectory = try Zip.quickUnzipFile(filePath) // Unzip + let zipFilePath = try Zip.quickZipFiles([filePath], fileName: "archive") // Zip } catch { print("Something went wrong") @@ -36,12 +36,12 @@ do { let filePath = NSBundle.mainBundle().URLForResource("file", withExtension: "zip")! let documentsDirectory = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0] as NSURL - try Zip().unzipFile(filePath, destination: documentsDirectory, overwrite: true, password: "password", progress: { (progress) -> () in + try Zip.unzipFile(filePath, destination: documentsDirectory, overwrite: true, password: "password", progress: { (progress) -> () in print(progress) }) // Unzip let zipFilePath = documentsFolder.URLByAppendingPathComponent("archive.zip") - try Zip().zipFiles([filePath], zipFilePath: zipFilePath, password: "password", progress: { (progress) -> () in + try Zip.zipFiles([filePath], zipFilePath: zipFilePath, password: "password", progress: { (progress) -> () in print(progress) }) //Zip -- 2.26.2