docs: public void addDirectory(File dir) {
      File[] ndirs = new File[directories.length + 1];
      System.arraycopy(directories, 0, ndirs, 0, directories.length);
      ndirs[ndirs.length - 1] = dir;
      directories = ndirs;
    }