Пример #1
0
 public static void main(String args[]) throws IOException {
   final String path = "C:\\GitHub\\mapfish-printV3\\core\\src\\test\\resources\\map-data";
   final File root = new File(path);
   final FluentIterable<File> files = Files.fileTreeTraverser().postOrderTraversal(root);
   for (File file : files) {
     if (Files.getFileExtension(file.getName()).equals("png")) {
       final BufferedImage img = ImageIO.read(file);
       writeUncompressedImage(img, file.getAbsolutePath());
     }
   }
 }
 private Collection<File> listImportFiles() {
   Collection<File> importFiles = new HashSet<>();
   File lockRoot = projects.FS_LAYOUT.getLockRoot();
   Path lockRootPath = lockRoot.toPath();
   for (File f : Files.fileTreeTraverser().preOrderTraversal(lockRoot)) {
     if (f.isFile()
         && !f.getName().endsWith(".lock")
         && matches(lockRootPath.relativize(f.toPath()))) {
       importFiles.add(f);
     }
   }
   return importFiles;
 }