private void recursiveDelete(final File f){
  if (f.isDirectory()) {
    final File[] children=f.listFiles();
    for (int i=0; i < children.length; i++) {
      recursiveDelete(children[i]);
    }
  }
  if (log.isInfoEnabled())   log.info("Removing: " + f);
  if (f.exists() && !f.delete()) {
    log.warn("Could not remove: " + f);
  }
}

private void recursiveDelete ( final File f ) { if ( f . isDirectory ( ) ) { final File [ ] children = f . listFiles ( ) ; for ( int i = 0 ; i < children . length ; i ++ ) { recursiveDelete ( children [ i ] ) ; } } if ( log . isInfoEnabled ( ) ) log . info ( "Removing: " + f ) ; if ( f . exists ( ) && ! f . delete ( ) ) { log . warn ( "Could not remove: " + f ) ; } }
recursively removes any files and subdirectories and then removes the file ( or directory ) itself .
