List of utility methods to do File Delete
boolean | delete(File f, boolean recursive) delete if (!f.exists()) return false; if (recursive && f.isDirectory()) { File[] children = f.listFiles(); for (File c : children) { if (!delete(c, true)) return false; return f.delete(); |
boolean | delete(File file) Deletes the given file or directory. if (!file.exists()) throw new IOException(file.getName() + " does not exist"); if (isSymlink(file)) { return true; boolean result = true; if (file.isDirectory()) { File[] children = file.listFiles(); ... |
void | delete(File file) delete if (!isFS2File(file)) return; if (file.isDirectory()) for (File child : file.listFiles()) delete(child); file.delete(); |
boolean | delete(File file) Deletes a file or directory recursively. if (file.isDirectory()) { File[] files = file.listFiles(); for (int i = 0; i < files.length; i++) { if (!delete(files[i])) return false; if (!file.delete()) { ... |
int | delete(File file) delete if (file == null) { return 0; int deleted = 0; if (file.isDirectory()) { for (File child : file.listFiles()) { deleted += delete(child); if (file.delete()) { return deleted + 1; file.deleteOnExit(); return deleted; |
boolean | delete(File file) Delete a file or directory and insure that the file is no longer present on file system. if (!file.exists()) { return true; if (file.isDirectory()) { flushDirectoryContent(file); file.delete(); if (isFileDeleted(file)) { ... |
boolean | delete(File file) Recursively deletes a file or directory and its contents; returns false if something went wrong in the process (which may leave the job partially complete). if (file == null) return true; if (!file.isDirectory()) return file.delete(); File[] flist = file.listFiles(); if (flist != null) { boolean r = true; for (File f : flist) { ... |
void | delete(File file) Delete the specified file, recursively as necessary. if (file.exists()) { if (file.isDirectory()) { File[] files = file.listFiles(); for (int i = 0; i < files.length; i++) { delete(files[i]); file.delete(); ... |
void | delete(File file) Do File.delete(), ignoring failure. if (file.exists() && !file.delete()) { return; |
boolean | delete(File file) Delete the given file (can be a simple file or a folder). if (file == null) return false; boolean success = true; if (file.isDirectory()) { String[] children = file.list(); for (int i = 0; i < children.length; i++) { success &= delete(new File(file, children[i])); return (success &= file.delete()); |