DroidScript wiki

(was AndroidScript) unofficial documentation by the community

User Tools

Site Tools


sample_code:unzip_folders

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sample_code:unzip_folders [2014/12/17 16:25] (current)
octazid created
Line 1: Line 1:
 +====== Unzip a Folder ====== 
 +(Sample Code taken from the DroidScript Google-Group) 
 +<code JavaScript unzip.js>​ 
 +function unzip(zipfile,​ extractpath)  
 +
 +    var zip = app.CreateZipUtil();​ 
 +    zip.Open(zipfile);​ 
 +    var files = zip.List().split(","​);​ 
 +    files.forEach(function (item)  
 +    { 
 +        zip.Extract(item,​ extractpath+"/"​+item);​ 
 +    }); 
 +    zip.Close();​ 
 +
 +</​code>​
sample_code/unzip_folders.txt · Last modified: 2014/12/17 16:25 by octazid