public static void deleteDirectory(IProgressMonitor monitor,File directory,File base,int step) throws IOException {
  if (!directory.exists()) {
    return;
  }
  cleanDirectory(monitor,directory,base,step);
  if (!directory.delete()) {
    String message="Unable to delete directory " + directory + ".";
    throw new IOException(message);
  }
}

public static void deleteDirectory ( IProgressMonitor monitor , File directory , File base , int step ) throws IOException { if ( ! directory . exists ( ) ) { return ; } cleanDirectory ( monitor , directory , base , step ) ; if ( ! directory . delete ( ) ) { String message = "Unable to delete directory " + directory + "." ; throw new IOException ( message ) ; } }
recursively delete a directory .
