urbanairship-core/src/main/java/com/urbanairship/util/FileUtils.java
public static boolean deleteRecursively(File file) {
        if (!file.exists()) {
            return false;
        }

        if (!file.isDirectory()) {
            return file.delete();
        }


        File[] children = file.listFiles();
        if (children != null) {
            for (File child : file.listFiles()) {
                if (!deleteRecursively(child)) {
                    return false;
                }
            }
        }

        return file.delete();
    }
/**
     * Deletes a file and/or folder recursively.
     *
     * @param file The file to delete.
     * @return {@code true} if the file was deleted, otherwise {@code false}.
     */
Deletes a file and/or folder recursively.
@param file The file to delete.
@return  true if the file was deleted, otherwise  false.
Deletes a file and / or folder recursively . @param file The file to delete . @return true if the file was deleted otherwise false .
public static boolean deleteRecursively(File file) {
        if (!file.exists()) {
            return false;
        }
        if (!file.isDirectory()) {
            return file.delete();
        }
        File[] children = file.listFiles();
        if (children != null) {
            for (File child : file.listFiles()) {
                if (!deleteRecursively(child)) {
                    return false;
                }
            }
        }
        return file.delete();
    }
public static boolean deleteRecursively ( File file ) { if ( ! file . exists ( ) ) { return false ; } if ( ! file . isDirectory ( ) ) { return file . delete ( ) ; } File [ ] children = file . listFiles ( ) ; if ( children != null ) { for ( File child : file . listFiles ( ) ) { if ( ! deleteRecursively ( child ) ) { return false ; } } } return file . delete ( ) ; }
Deletes a file and/or folder recursively.
Deletes a file and / or folder recursively .