Created
July 21, 2014 12:27
-
-
Save toomasr/e150382248378d626a2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import org.zeroturnaround.zip.NameMapper; | |
import org.zeroturnaround.zip.ZipUtil; | |
public class ZipUtilTest { | |
public static void main(String[] args) { | |
// file to unpack | |
File input = new File("/Users/toomasr/tmp/zipTest.zip"); | |
// folder to store the unpacked files | |
File output = new File("/tmp"); | |
ZipUtil.unpack(input, output, new NameMapper() { | |
public String map(String name) { | |
if (name.contains("/dir")) | |
return name; | |
else | |
return null; | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment