List of utility methods to do File Delete
void | delete(File file) delete if (null == file) throw new IllegalArgumentException("Illegal 'file' argument in Utils.delete(File): " + file); if (file.exists()) { if (file.isDirectory()) { for (File child : file.listFiles()) { delete(child); file.delete(); |
void | delete(File file) delete if (file.isDirectory()) {
deleteChildren(file);
deleteFile(file);
|
void | delete(File file) Will recursively delete a directory if (file == null) { return; if (file.isDirectory()) { String files[] = file.list(); if (files != null) { if (files.length != 0) { for (String temp : files) { ... |
void | delete(File file) delete if (!file.exists()) return; if (file.isDirectory()) { if (file.list().length == 0) { file.delete(); } else { String files[] = file.list(); for (String temp : files) { ... |
void | delete(File file) delete if (file.isDirectory()) { File[] files = file.listFiles(); for (File file2 : files) delete(file2); if (!file.delete()) throw new RuntimeException("Failed to delete file: " + file); |
boolean | delete(File file) Delete a file or directory. if (file.isDirectory()) { File[] entries = file.listFiles(); if (entries != null) { for (File entry : entries) { if (!delete(entry)) { return false; return file.delete(); |
void | delete(File file) delete if (file != null && file.exists()) { boolean deleted = file.delete(); if (!deleted) { file.deleteOnExit(); |
void | delete(File file) delete if (writeable(file)) { if (file.isDirectory()) { for (File f : file.listFiles()) delete(f); file.delete(); |
void | delete(File file) delete try { file.delete(); } catch (Exception e) { throw new Exception(file.toString() + ": Can't delete"); |
boolean | delete(File file) deletes files and directories if (file != null && file.exists()) { if (file.isDirectory()) { for (File child : file.listFiles()) { delete(child); return file.delete(); } else { ... |