Package | com.myflashlab.air.extensions.zip |
Class | public class ZipManager |
Inheritance | ZipManager flash.events.EventDispatcher |
ZipManager class will zip or unzip big, big zip archives super fast as it is using native process in threads supporting both Android and iOS. you will have listeners to watch the process progress.
Method | Defined By | ||
---|---|---|---|
ZipManager | |||
cancelUnzipping($removeDir:Boolean):Boolean
Call this if you wish to stop the unzipping process
| ZipManager | ||
cancelZipping($removeZip:Boolean):Boolean
Call this to cancel the zipping process. | ZipManager | ||
dispose():void
Call to dispose the extension
| ZipManager | ||
unzip($zipFile:File, $location:File):void
Call to start unzipping a specified zip file to your target dir location
| ZipManager | ||
zip($zipFile:File, $targetDir:File):void
Call to start zipping a directory and everything in it!
| ZipManager |
Constant | Defined By | ||
---|---|---|---|
EXTENSION_ID : String = com.myflashlab.air.extensions.zipManager [static] | ZipManager | ||
VERSION : String = 3.1.21 [static] | ZipManager |
ZipManager | () | Constructor |
public function ZipManager()
cancelUnzipping | () | method |
public function cancelUnzipping($removeDir:Boolean):Boolean
Call this if you wish to stop the unzipping process
Parameters
$removeDir:Boolean — if set to true the tmp directory will be deleted also.
|
Boolean — |
cancelZipping | () | method |
public function cancelZipping($removeZip:Boolean):Boolean
Call this to cancel the zipping process.
Parameters
$removeZip:Boolean — if set to true the tmp zip file will also be deleted.
|
Boolean — |
dispose | () | method |
public function dispose():void
Call to dispose the extension
unzip | () | method |
public function unzip($zipFile:File, $location:File):void
Call to start unzipping a specified zip file to your target dir location
Parameters
$zipFile:File | |
$location:File |
zip | () | method |
public function zip($zipFile:File, $targetDir:File):void
Call to start zipping a directory and everything in it!
Parameters
$zipFile:File | |
$targetDir:File |
EXTENSION_ID | Constant |
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.zipManager
VERSION | Constant |
public static const VERSION:String = 3.1.21
import com.myflashlab.air.extensions.zip. var _ex:ZipManager = new ZipManager(); _ex.addEventListener(ZipManagerEvent.START, onStart); _ex.addEventListener(ZipManagerEvent.ERROR, onError); _ex.addEventListener(ZipManagerEvent.PROGRESS, onProgress); _ex.addEventListener(ZipManagerEvent.COMPLETED, onComplete); _ex.unzip(File.applicationStorageDirectory.resolvePath("TheZipFile.zip"), File.applicationStorageDirectory.resolvePath("unzipLocation")); function onStart(e:ZipManagerEvent):void { trace("zip process started..."); } function onError(e:ZipManagerEvent):void { trace("zip process ERROR: " + e.param.msg); } function onProgress(e:ZipManagerEvent):void { trace("zip Progress = " + e.param.perc + "%"); } function onComplete(e:ZipManagerEvent):void { trace("[zip process finished]"); }