public boolean deleteAll(final Folder folder) {
        try (ContextLogger cLog = new ContextLogger("FolderUtils.deleteAll: %s", folder)) {

            return treeWalk(folder, fi -> {
                if (fi.left.isDirectory) {
                    if (fi.right) {
                        return TreeWalkResult.CONTINUE;
                    } else {
                        return pls.delete(fi.left.uri) ? TreeWalkResult.CONTINUE : TreeWalkResult.STOP;
                    }
                } else {
                    return pls.delete(fi.left.uri) ? TreeWalkResult.CONTINUE : TreeWalkResult.STOP;
                }
            });
        }
    }
returns folder informations with regards to files/dirs currently in folder, restricts scan to a maximum of subfolders e.g. to reduce info gathering time
main/src/main/java/cgeo/geocaching/storage/FolderUtils.java