public static void rDelete(File dir){
  if (dir.isDirectory()) {
    File[] files=dir.listFiles();
    for (    File f : files)     rDelete(f);
  }
  dir.delete();
}

public static void rDelete ( File dir ) { if ( dir . isDirectory ( ) ) { File [ ] files = dir . listFiles ( ) ; for ( File f : files ) rDelete ( f ) ; } dir . delete ( ) ; }
recursively deletes an entire local file system directory .
