This shows you the differences between two versions of the page.
built_in:zip [2016/01/22 09:38] administrator [Table] |
built_in:zip [2016/01/22 17:38] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ZipUtil control ====== | + | |
- | ===== Create ===== | + | |
- | Create a ZipUtil control using the CreateZipUtil function of the [[built_in: | + | |
- | < | + | |
- | Also you can use it in a function like this: | + | |
- | <code javascript> | + | |
- | function unzip(zipfile, | + | |
- | { | + | |
- | var zip = app.CreateZipUtil(); | + | |
- | zip.Open(zipfile); | + | |
- | var files = zip.List().split("," | + | |
- | files.forEach(function (item) | + | |
- | { | + | |
- | zip.Extract(item, | + | |
- | }); | + | |
- | zip.Close(); | + | |
- | } | + | |
- | </ | + | |
- | ===== Methods ===== | + | |
- | ^ Method | + | |
- | | ZipUtil.AddFile( name,file ) | | | + | |
- | | ZipUtil.AddText( name,text ) | | | + | |
- | | ZipUtil.Close() | + | |
- | | ZipUtil.Create( file ) | | | + | |
- | | ZipUtil.Extract( name,file ) | | | + | |
- | | ZipUtil.List( path ) | | | + | |
- | | ZipUtil.Open( file ) | | | + |