common_helper/src/main/java/com/xiongyingqi/util/FileSystemUtils.java
public static boolean deleteRecursively(File root) {
        if (root != null && root.exists()) {
            if (root.isDirectory()) {
                File[] children = root.listFiles();
                if (children != null) {
                    for (File child : children) {
                        deleteRecursively(child);
                    }
                }
            }
            return root.delete();
        }
        return false;
    }
public static boolean deleteRecursively(File root) {
        if (root != null && root.exists()) {
            if (root.isDirectory()) {
                File[] children = root.listFiles();
                if (children != null) {
                    for (File child : children) {
                        deleteRecursively(child);
                    }
                }
            }
            return root.delete();
        }
        return false;
    }
Delete the supplied {@link java.io.File} - for directories,
recursively delete any nested directories or files as well.

@param root the root {@code File} to delete
@return {@code true} if the {@code File} was deleted,
otherwise {@code false}