IOS zip 解压/压缩ANE
ANEZipFileAdobe AIR iOS Native Extension to zip/unzip files.Uses a slightly modified verion of SSZipArchive Obj-C https://github.com/soffes/ssziparchiveFeatures:Unzip[*]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
[*]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 )
Todo
[*]Add working example
[*]Enable creation of password protected zips
Actionscript ClassesANEZipUtils MethodslistDirToZip(folder : File) : Array;List Directory contents of folder.Returns an array of file paths.extractFile(zipfile : File, fileName : String, password : String = "") : ByteArray;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 protectedextractFileAsync(zipfile : File, fileName : String, password : String = "") : void;
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.getZipContents(zipfile : File) : Array;Get a list of the files inside the zipisPasswordProtected(zipfile : File) : Boolean;Determines if the provided zip file is password protectedunzip(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 dirDispatches 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 pathzipDirectory(outputZip : File, sourceDirectory : File) : void;Zips the contents of a directoryDispatches ANEZipFileEvent.
ZIP_START when the process is started.
event.eventData will contain:
* path -> Path to the generated zip fileDispatches ANEZipFileEvent.ZIP_END when the process is finished.
event.eventData will contain:
* path -> Path to the generated zip file
* success -> Success of the zip actionDispatches ANEZipFileEvent.ZIP_PROGRESS while processing.
event.eventData will contain:
* current -> current index of compressed file
* total -> total files to compress inside zipzipFiles(outputZip : File, sourceFiles : Array, destinationFiles : Array = null) : void;Zips files to a zip.Dispatches ANEZipFileEvent.ZIP_START when the process is started.
event.eventData will contain:
* path -> Path to the generated zip fileDispatches ANEZipFileEvent.ZIP_END when the process is finished.
event.eventData will contain:
* path -> Path to the generated zip file
* success -> Success of the zip actionDispatches ANEZipFileEvent.ZIP_PROGRESS while processing.
event.eventData will contain:
* current -> current index of compressed file
* total -> total files to compress inside zip
ANEZipFile Methods
addFile(file : File, destination : String = "") : Boolean;Add a file to the zipaddFileAsync(file : File, destination : String = "") : void;Add a file to the zip ASynchronouslyclose() : Boolean;Closes de current zip filedispose() : void;Disposes instanceopen(zipfile : File, fileMode : uint = 0) : Boolean;Open a zip file for create / append files.Avaliable filemodes are:
* ANEZipFile.FILE_MODE_CREATE
* ANEZipFile.FILE_MODE_APPENDwriteBytes(bytes : ByteArray, fileName : String) : Boolean;Write ByteArray data to a file in zipwriteBytesAsync(bytes : ByteArray, fileName : String) : void;Write ByteArray data to a file in zip ASynchronously
Licensehttps://camo.githubusercontent.com/9df00526e958635bcd1988a037413bdce001b493/687474703a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f6c2f62792d73612f332e302f38387833312e706e67ANEZipFile 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 licenseThanksThanks soffes for creating SSZipArchive which ANEZipFile is based on
相关链接:
https://github.com/xperiments/ANEZipFile
相关下载:
IOS RAR解压ANE 请问支持64位吗。 fubai 发表于 2015-6-1 14:31
请问支持64位吗。
好像不支持 好吧。。。。。。 fubai 发表于 2015-6-3 18:03
好吧。。。。。。
http://myappsnippet.com/zip-manager-adobe-air-extension/
这里有个收费的 破晓 发表于 2015-6-4 09:05
http://myappsnippet.com/zip-manager-adobe-air-extension/
这里有个收费的
谢谢。。。。。。
页:
[1]