@Test void testUnzipSkipHidden() throws IOException { InputStream is = ZipFileUtil.class.getResourceAsStream("test.zip"); Path tempDirPath = tempDir.toPath(); Path targetPath = tempDirPath.resolve("test.zip"); java.nio.file.Files.copy(is, targetPath); List<File> files = ZipFileUtil.unzipSkipHidden(targetPath.toFile()); Path visiblePath = tempDirPath.resolve(Paths.get("subdir", "visible.txt")); assertEquals(singletonList(visiblePath.toFile()), files); assertEquals("aff776838092862d398b58e380901753", md5Hash(visiblePath)); }
public static List<File> unzipSkipHidden(File file) { return unzip(file, name -> name.startsWith(".") || name.startsWith("_") ? null : name); }
ZipFileUtil { public static List<File> unzipSkipHidden(File file) { return unzip(file, name -> name.startsWith(".") || name.startsWith("_") ? null : name); } }
ZipFileUtil { public static List<File> unzipSkipHidden(File file) { return unzip(file, name -> name.startsWith(".") || name.startsWith("_") ? null : name); } private  ZipFileUtil(); }
ZipFileUtil { public static List<File> unzipSkipHidden(File file) { return unzip(file, name -> name.startsWith(".") || name.startsWith("_") ? null : name); } private  ZipFileUtil(); static void unzip(InputStream is, File outputDir); static List<File> unzipSkipHidden(File file); }
ZipFileUtil { public static List<File> unzipSkipHidden(File file) { return unzip(file, name -> name.startsWith(".") || name.startsWith("_") ? null : name); } private  ZipFileUtil(); static void unzip(InputStream is, File outputDir); static List<File> unzipSkipHidden(File file);  }