algoliasearch/src/offline/java/com/algolia/search/saas/FileUtils.java
public static boolean deleteRecursive(@NonNull File item)
    {
        boolean ok = true;
        if (item.isDirectory()) {
            for (File child : item.listFiles()) {
                ok = ok && deleteRecursive(child);
            }
        }
        ok = ok && item.delete();
        return ok;
    }
public static boolean deleteRecursive(@NonNull File item)
    {
        boolean ok = true;
        if (item.isDirectory()) {
            for (File child : item.listFiles()) {
                ok = ok && deleteRecursive(child);
            }
        }
        ok = ok && item.delete();
        return ok;
    }
public static boolean deleteRecursive ( @ NonNull File item ) { boolean ok = true ; if ( item . isDirectory ( ) ) { for ( File child : item . listFiles ( ) ) { ok = ok && deleteRecursive ( child ) ; } } ok = ok && item . delete ( ) ; return ok ; }
Delete a file or directory, recursively deleting any descendant files/directories if it's a directory.

@param item The item to delete.
@return true if success, false if error.
Delete a file or directory recursively deleting any descendant files / directories if it s a directory .