Esempio n. 1
0
 static public ArrayList<File> findFilesInFolder(File folder, String extension,
                                                 boolean recurse) {
   ArrayList<File> files = new ArrayList<File>();
   
   if (folder.listFiles() == null) return files;
   
   for (File file : folder.listFiles()) {
     if (file.getName().startsWith(".")) continue; // skip hidden files
     
     if (file.getName().endsWith("." + extension))
       files.add(file);
       
     if (recurse && file.isDirectory()) {
       files.addAll(findFilesInFolder(file, extension, true));
     }
   }
   
   return files;
 }
 public boolean avrdude(Collection p1, Collection p2) throws RunnerException {
   ArrayList p = new ArrayList(p1);
   p.addAll(p2);
   return avrdude(p);
 }