code: private static Set<File> findAllFiles(File dir) {
          Set<File> foundFiles = new HashSet<>();
          if (dir == null) {
              return foundFiles;
          }
          recurse(dir, foundFiles);
          return foundFiles;
      }
docs: Utility method to recursively find all files below a directory.