List of utility methods to do File Delete
void | delete(File file) delete if (!file.exists()) { return; if (file.isDirectory()) { String[] entries = file.list(); if (entries.length == 0) { file.delete(); } else { ... |
boolean | delete(File file) Deletes a file. logger.entering("de.axelwernicke.mypod.util.FileUtils", "delete"); boolean success = false; try { if (file.canRead() && file.canWrite()) { boolean deleted = file.delete(); if (!deleted) { file.deleteOnExit(); success = true; } catch (Exception e) { logger.warning("Exception raised: " + e.getMessage()); e.printStackTrace(); logger.exiting("de.axelwernicke.mypod.util.FileUtils", "delete"); return success; |
void | delete(File file) Recursively deletes file or directory. if (file.exists()) { if (file.isDirectory()) { for (File c : file.listFiles()) { delete(c); if (!file.delete()) { throw new IOException("Could not delete " + file.getAbsolutePath()); ... |
List | delete(File file) Deletes a file or a directory and all of its contents List<File> failures = new ArrayList<File>(); if (file.isDirectory()) { deleteContents(file, failures); if (!file.delete()) { failures.add(file); return failures; ... |
void | delete(File file) delete delete(file, false); |
void | delete(File file) delete if (file.isFile()) file.delete(); else if (file.isDirectory()) { File[] files = file.listFiles(); if (files != null && files.length > 0) { for (File f : files) { delete(f); file.delete(); |
void | delete(File file) Delete the given file or directory. if (file.isDirectory()) {
safelyDeleteContents(file);
file.delete();
|
void | delete(File file) delete if (!file.exists()) return; if (file.delete()) return; System.gc(); if (file.delete()) return; try { ... |
void | doDelete(File f) do Delete try { if (f != null && f.exists()) { f.delete(); } catch (Exception e) { |
boolean | doDelete(File file) do Delete if (!file.isDirectory()) return file.delete(); File[] files = file.listFiles(); if (files == null) return file.delete(); for (File child : files) { if (!doDelete(child)) return false; ... |