@Test public void testUnzip() throws IOException { String zip = Resources.getAbsolutePath("/good.zip"); String parent = FileOps.tempDir("zip"); String dest = Paths.get(parent).resolve("target").toAbsolutePath() .toString(); ZipFiles.unzip(zip, dest); Assert.assertEquals(1, Files.list(Paths.get(dest)).count()); Assert.assertEquals(1, Files.list(Paths.get(parent)).count()); }
public static void unzip(String zipPath, String destination) { File dest = new File(destination); if(!dest.exists()) { dest.mkdirs(); } Verify.thatArgument(dest.isDirectory(), "Unzip destination must be a directory"); try { ZipUtil.unpack(new File(zipPath), dest); } catch (org.zeroturnaround.zip.ZipException e) { IllegalArgumentException ex = new IllegalArgumentException( e.getMessage()); ex.setStackTrace(e.getStackTrace()); throw ex; } }
ZipFiles { public static void unzip(String zipPath, String destination) { File dest = new File(destination); if(!dest.exists()) { dest.mkdirs(); } Verify.thatArgument(dest.isDirectory(), "Unzip destination must be a directory"); try { ZipUtil.unpack(new File(zipPath), dest); } catch (org.zeroturnaround.zip.ZipException e) { IllegalArgumentException ex = new IllegalArgumentException( e.getMessage()); ex.setStackTrace(e.getStackTrace()); throw ex; } } }
ZipFiles { public static void unzip(String zipPath, String destination) { File dest = new File(destination); if(!dest.exists()) { dest.mkdirs(); } Verify.thatArgument(dest.isDirectory(), "Unzip destination must be a directory"); try { ZipUtil.unpack(new File(zipPath), dest); } catch (org.zeroturnaround.zip.ZipException e) { IllegalArgumentException ex = new IllegalArgumentException( e.getMessage()); ex.setStackTrace(e.getStackTrace()); throw ex; } }  }
ZipFiles { public static void unzip(String zipPath, String destination) { File dest = new File(destination); if(!dest.exists()) { dest.mkdirs(); } Verify.thatArgument(dest.isDirectory(), "Unzip destination must be a directory"); try { ZipUtil.unpack(new File(zipPath), dest); } catch (org.zeroturnaround.zip.ZipException e) { IllegalArgumentException ex = new IllegalArgumentException( e.getMessage()); ex.setStackTrace(e.getStackTrace()); throw ex; } }  static ByteBuffer getEntryContent(String zipFile,
            String relativeEntryPath); static String getEntryContentUtf8(String zipFile,
            String relativeEntryPath); static void unzip(String zipPath, String destination); }
ZipFiles { public static void unzip(String zipPath, String destination) { File dest = new File(destination); if(!dest.exists()) { dest.mkdirs(); } Verify.thatArgument(dest.isDirectory(), "Unzip destination must be a directory"); try { ZipUtil.unpack(new File(zipPath), dest); } catch (org.zeroturnaround.zip.ZipException e) { IllegalArgumentException ex = new IllegalArgumentException( e.getMessage()); ex.setStackTrace(e.getStackTrace()); throw ex; } }  static ByteBuffer getEntryContent(String zipFile,
            String relativeEntryPath); static String getEntryContentUtf8(String zipFile,
            String relativeEntryPath); static void unzip(String zipPath, String destination);  }