Go to file
Kyle Jessup c2dabad5a8
Merge pull request #4 from florianreinhart/master
Fix deprecation warnings related to String.characters
2018-04-09 13:48:34 -04:00
Sources Fix deprecation warnings related to String.characters 2017-11-15 18:24:42 +01:00
Tests Pinned dep versions 2016-09-06 16:29:05 -04:00
.gitattributes Create .gitattributes 2018-02-01 15:06:29 -05:00
.gitignore Reorganized and brought in minizip from external repo. tagging 3.0 2017-10-17 12:27:10 -04:00
LICENSE initial commit 2016-08-02 17:08:59 -04:00
LICENSE.zh_CN LICENSE & README translated 2016-12-12 14:45:36 -05:00
Package.swift Update Package.swift 2018-01-31 11:46:07 -05:00
README.md Update README.md 2018-02-09 13:06:20 -05:00
README.zh_CN.md Reorganized and brought in minizip from external repo. tagging 3.0 2017-10-17 12:27:10 -04:00

README.md

Perfect Zip 简体中文

Get Involed with Perfect!

Star Perfect On Github Stack Overflow Follow Perfect on Twitter Join the Perfect Slack

Swift 3.0 Platforms OS X | Linux License Apache PerfectlySoft Twitter Slack Status

Perfect Zip utility

This Perfect module wraps the minizip C library and provides simple zip and unzip functionality.

Including in your project

Add this project as a dependency in your Package.swift file.

.Package(url: "https://github.com/PerfectlySoft/Perfect-Zip.git", majorVersion: 3)

Running

The following will zip the specified directory:

import PerfectZip

let zippy = Zip()

let thisZipFile = "/path/to/ZipFile.zip"
let sourceDir = "/path/to/files/"

let ZipResult = zippy.zipFiles(
	paths: [sourceDir], 
	zipFilePath: thisZipFile, 
	overwrite: true, password: ""
)
print("ZipResult Result: \(ZipResult.description)")

To unzip a file:

import PerfectZip

let zippy = Zip()

let sourceDir = "/path/to/files/"
let thisZipFile = "/path/to/ZipFile.zip"

let UnZipResult = zippy.unzipFile(
	source: thisZipFile, 
	destination: sourceDir, 
	overwrite: true
)
print("Unzip Result: \(UnZipResult.description)")

Further Information

For more information on the Perfect project, please visit perfect.org.