Zip archiving library written in Swift and C.
This library inspired by System.IO.Compression namespace of the .NET Framework.
import ZipArchive
let sourceFile = "/path/to/archive.zip"
let destinationDirectory = "/path/to/directory"
try! ZipFile.extractToDirectory(sourceFile, destinationDirectoryName: destinationDirectory)
import ZipArchive
let sourceDirectory = "/path/to/directory"
let destinationFile = "/path/to/archive.zip"
try! ZipFile.createFromDirectory(sourceDirectory, destinationArchiveFileName: destinationFile)
import ZipArchive
let archiveFile = "/path/to/archive.zip"
let archive = ZipArchive(path: archiveFile, mode: .Read)!
defer { archive.dispose() }
for entry in archive.entries {
print("\(entry.fullName)")
}
TBD
github "yaslab/ZipArchive.swift" ~> 0.2.0
.package(url: "https://github.com/yaslab/ZipArchive.swift.git", .upToNextMinor(from: "0.2.0"))
ZipArchive.swift is licensed under the MIT license.