code: private void addFeaturesRecursively(File directory, List<File> targetList, FileFilter fileFilter) {
          File[] files = directory.listFiles();
  
          //sort the files here, since otherwise we get differences in execution order between 'nix, case sensitive
          //and win, case insensitive, toys 'r us
          Arrays.sort(files, new Comparator<File>() {
              public int compare(File o1, File o2) {
                  return o1.getName().compareTo(o2.getName());
              }
          });
  
          for (File f : files) {
              if (f.isDirectory()) {
                  addFeaturesRecursively(f, targetList, fileFilter);
              } else if (fileFilter.accept(f)) {
                  targetList.add(f);
              }
          }
      }
docs: Recursively scans subdirectories, adding all feature files to the targetList.