Adobe AIR iOS Native Extension to zip/unzip files.
Uses a slightly modified verion of SSZipArchive Obj-C https://github.com/soffes/ssziparchive
- Unzip Files Asynchronously
- Unzip password protected files
- Unzip single file from zip to ByteArray ( Sync/Async )
- List Files inside zip
- Determine if zip is password protected
- Zip contents of a directory from FileSystem Asynchronously
- Zip group of Files from Filesystem Asynchronously
- Append files from FileSystem to zip ( Sync/Async )
- Append ByteArray Data to a file inside zip ( Sync/Async )
- Add working example
- Enable creation of password protected zips
List Directory contents of folder.
Returns an array of file paths.
Synchronously gets the contents of a single file in zip.
Return ByteArray data of the extracted file.
Pass a password if the zip file is password protected
ASynchronously gets the contents of a single file in zip.
Pass a password if the zip file is password protected.
Dispatches ANEZipFileEvent.UNZIP_FILE_BYTES.
event.resultBytes -> will contain the file ByteArray representation.
Get a list of the files inside the zip
Determines if the provided zip file is password protected
unzip(zipfile : File, destination : File, overwrite : Boolean = false, password : String = "") : void;
Unzips a zip file to the filesystem.
Dispatches ANEZipFileEvent.UNZIP_START when the process is started.
Dispatches ANEZipFileEvent.UNZIP_END when the process is finished.
event.eventData will contain:
* source -> path of original zip file
* destination -> path of the destination dir
Dispatches ANEZipFileEvent.UNZIP_PROGRESS while processing.
event.eventData will contain:
* current -> current index of decompressed file
* total -> total files to decompress inside zip
* path -> current decompressed file path
Zips the contents of a directory
Dispatches ANEZipFileEvent.ZIP_START when the process is started.
event.eventData will contain:
* path -> Path to the generated zip file
Dispatches ANEZipFileEvent.ZIP_END when the process is finished.
event.eventData will contain:
* path -> Path to the generated zip file
* success -> Success of the zip action
Dispatches ANEZipFileEvent.ZIP_PROGRESS while processing.
event.eventData will contain:
* current -> current index of compressed file
* total -> total files to compress inside zip
Zips files to a zip.
Dispatches ANEZipFileEvent.ZIP_START when the process is started.
event.eventData will contain:
* path -> Path to the generated zip file
Dispatches ANEZipFileEvent.ZIP_END when the process is finished.
event.eventData will contain:
* path -> Path to the generated zip file
* success -> Success of the zip action
Dispatches ANEZipFileEvent.ZIP_PROGRESS while processing.
event.eventData will contain:
* current -> current index of compressed file
* total -> total files to compress inside zip
Add a file to the zip
Add a file to the zip ASynchronously
Closes de current zip file
Disposes instance
Open a zip file for create / append files.
Avaliable filemodes are:
* ANEZipFile.FILE_MODE_CREATE
* ANEZipFile.FILE_MODE_APPEND
Write ByteArray data to a file in zip
Write ByteArray data to a file in zip ASynchronously
ANEZipFile by Pedro Casaubon is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
A slightly modified version of SSZipArchive that is licensed under the MIT license
Thanks soffes for creating SSZipArchive which ANEZipFile is based on