code: public static boolean deleteDirectoryTree( File dir )
      {
          File[] files = dir.listFiles();
          if (files == null) files = new File[0];
          for (File file : files)
          {
              deleteDirectoryTree( file );
          }
          return dir.delete();
      }
docs: <p>deleteDirectoryTree.</p>
  
  @param dir a {@link java.io.File} object.
  @return a boolean.