List of utility methods to do Directory Delete
boolean | deleteDirectory(File path) delete Directory if (path.exists()) { File[] files = path.listFiles(); if (files == null) { return true; for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { deleteDirectory(files[i]); ... |
void | deleteDir(File dir) delete Dir if (dir != null && dir.isDirectory()) { String[] children = dir.list(); for (int i = 0; i < children.length; i++) { deleteDir(new File(dir, children[i])); dir.delete(); |
void | deleteDir(File f) delete Dir try { if (f.isDirectory()) { for (File c : f.listFiles()) { deleteDir(c); f.delete(); } catch (Exception e) { ... |