List of utility methods to do Folder Recursive Delete
boolean | rmr(File path) rm -r equivalent -- remove file/dir recursively. Preconditions.checkArgument(!path.getCanonicalPath().equals("/")); if (path.exists() && path.isDirectory()) { File[] files = path.listFiles(); for (int i = 0; i < files.length; i++) { rmr(files[i]); return path.delete(); ... |
void | deleteFileAndFolder(File fileOrFolder) delete File And Folder if (fileOrFolder == null || !fileOrFolder.exists()) { return; if (fileOrFolder.isDirectory()) { File[] children = fileOrFolder.listFiles(); if (children != null) { for (File childFile : children) { deleteFileAndFolder(childFile); ... |