// get status of delete: true if the file was deleted successfully, or was already gone
final boolean gone = !file.exists() || file.delete();
// Usually if the file is already deleted, that is perfectly ok.  Some other
// program already deleted the file. You might want to treat that case specially,
// not identical to a successful delete.