This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
built_in:zip [2014/12/18 21:38] bcarroll [Methods] |
built_in:zip [2015/03/21 17:33] octazid [Create] formated |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== ZipUtil control ====== | ====== ZipUtil control ====== | ||
===== Create ===== | ===== Create ===== | ||
- | Create a ZipUtil control using the CreateZipUtil function of the app object: | + | Create a ZipUtil control using the CreateZipUtil function of the [[built_in:app|app]] |
< | < | ||
Also you can use it in a function like this: | Also you can use it in a function like this: | ||
- | < | + | < |
+ | function unzip(zipfile, | ||
+ | { | ||
var zip = app.CreateZipUtil(); | var zip = app.CreateZipUtil(); | ||
zip.Open(zipfile); | zip.Open(zipfile); | ||
var files = zip.List().split("," | var files = zip.List().split("," | ||
- | files.forEach(function (item) { | + | files.forEach(function (item) |
+ | | ||
zip.Extract(item, | zip.Extract(item, | ||
}); | }); |