List of utility methods to do Delete File if Exist
void | deleteIfExists(File f) delete If Exists assert !f.exists() || f.delete();
|
boolean | deleteIfExists(File file) delete If Exists if (file == null) { return true; return file.delete(); |
boolean | deleteIfExists(File file) Loescht die angegebene Datei falls sie existiert. if (file.exists()) { return file.delete(); } else { return true; |
void | deleteIfExists(File file) delete If Exists boolean result = file.delete(); if (!result && file.exists()) { throw new IOException("Failed to delete " + file.getAbsolutePath()); |
boolean | deleteIfExists(final File file) Delete the specified file (or directory). if ((file == null) || !file.exists()) { return false; return file.delete(); |
boolean | deleteIfExists(final File file) delete If Exists return file.exists() && !file.delete();
|
void | deleteIfExists(java.io.File file) delete If Exists if (file.exists()) { boolean isSuccessful = file.delete(); assert isSuccessful : file; assert file.exists() == false : file; |