public static List<File> findFiles(final File directory, final List<String> extensionFilter) {
    final List<File> foundFiles = new ArrayList<>();
    if (directory == null || !directory.isDirectory() || !directory.exists()) {
      return foundFiles;
    }

    final File[] files = directory.listFiles();
    if (files == null) {
      return foundFiles;
    }

    for (final File file : files) {
      if (file.isDirectory()) {
        foundFiles.addAll(findFiles(file, extensionFilter));
      }

      for (final String extension : extensionFilter) {
        final String filter = "." + extension;
        if (file.getName().endsWith(filter)) {
          foundFiles.add(file);
        }
      }
    }

    return foundFiles;
  }
BinDiff-specific file name and filesystem utility methods.
java/ui/src/main/java/com/google/security/zynamics/bindiff/utils/BinDiffFileUtils.java