code: private void output(File outFile) throws FileNotFoundException {
      System.out.println("Printing to " + outFile.toString());
      PrintStream out = new PrintStream(outFile);
      root.output(out, null);
      out.close();
    }
docs: Output directory structure to a file, each line of the file
  contains the directory name. Only empty directory names are printed.