code: protected void scandir(File dir, String vpath, boolean fast) {
          if (dir == null) {
              throw new RuntimeException("dir must not be null.");
          }
          String[] newfiles = dir.list();
          if (newfiles == null) {
              if (!dir.exists()) {
                  throw new RuntimeException(dir + " doesn't exist.");
              } else if (!dir.isDirectory()) {
                  throw new RuntimeException(dir + " is not a directory.");
              } else {
                  throw new RuntimeException("IO error scanning directory '"
                                           + dir.getAbsolutePath() + "'");
              }
          }
          scandir(dir, vpath, fast, newfiles);
      }
docs: Scan the given directory for files and directories. Found files and
  directories are placed in their respective collections, based on the
  matching of includes, excludes, and the selectors.  When a directory
  is found, it is scanned recursively.
  
  @param dir   The directory to scan. Must not be <code>null</code>.
  @param vpath The path relative to the base directory (needed to
  prevent problems with an absolute path when using
  dir). Must not be <code>null</code>.
  @param fast  Whether or not this call is part of a fast scan.
  
  @see #filesIncluded
  @see #filesNotIncluded
  @see #filesExcluded
  @see #dirsIncluded
  @see #dirsNotIncluded
  @see #dirsExcluded
  @see #slowScan