code: private Collection<File> doListAllFiles(File rootDir,
                                              boolean includeDirectories) {
          Collection<File> result = new Stack<File>();
          File[] files = rootDir.listFiles();
          for (File f : files) {
              if (f.isDirectory()) {
                  if (includeDirectories) {
                      result.add(f);
                  }
                  result.addAll(doListAllFiles(f, includeDirectories));
              } else if (f.isFile()) {
                  result.add(f);
              }
          }
          return result;
      }
docs: "Files (or directories) are deleted in the reverse order that they are registered. "