public void recursiveDelete(File fileOrDirectory){
  if (fileOrDirectory.isDirectory())   for (  File child : fileOrDirectory.listFiles())   recursiveDelete(child);
  try {
    fileOrDirectory.delete();
  }
 catch (  Exception e) {
    e.getStackTrace();
  }
}

public void recursiveDelete ( File fileOrDirectory ) { if ( fileOrDirectory . isDirectory ( ) ) for ( File child : fileOrDirectory . listFiles ( ) ) recursiveDelete ( child ) ; try { fileOrDirectory . delete ( ) ; } catch ( Exception e ) { e . getStackTrace ( ) ; } }
delete a recursively delete a folder or file
