public static void deleteFiles(File[] files,boolean wait){
  FileDeleteTask task=new FileDeleteTask(files);
  if (wait)   task.run();
 else {
    Thread t=new Thread(task);
    t.start();
  }
}

public static void deleteFiles ( File [ ] files , boolean wait ) { FileDeleteTask task = new FileDeleteTask ( files ) ; if ( wait ) task . run ( ) ; else { Thread t = new Thread ( task ) ; t . start ( ) ; } }
delete a list of one or more files in array order . if a particular file is deleted in the array , we guarantee that any previous files are also deleted . files after may or may not be deleted due to failures .
