static void dumbDeleteRecrusive(File file) throws IOException {
  if (file.isDirectory()) {
    for (    File entry : file.listFiles()) {
      dumbDeleteRecrusive(entry);
    }
  }
  if (!file.delete() && file.exists()) {
    throw new IOException("could not delete: " + file);
  }
}

static void dumbDeleteRecrusive ( File file ) throws IOException { if ( file . isDirectory ( ) ) { for ( File entry : file . listFiles ( ) ) { dumbDeleteRecrusive ( entry ) ; } } if ( ! file . delete ( ) && file . exists ( ) ) { throw new IOException ( "could not delete: " + file ) ; } }
delete a directory and its contents . warning : java apis do not let us distinguish directories from symbolic links to directories . consequently , if the directory contains symbolic links to directories , we will attempt to delete the contents of pointed - to directories .
