public List<ImmutablePair<ContentStorage.FileInformation, String>> getAllFiles(final Folder folder, final Predicate<ContentStorage.FileInformation> filter) {

        final List<ImmutablePair<ContentStorage.FileInformation, String>> result = new ArrayList<>();
        try (ContextLogger cLog = new ContextLogger("FolderUtils.getAllFiles: %s", folder)) {
            final Stack<String> paths = new Stack<>();
            paths.add("/");
            treeWalk(folder, fi -> {
                if (fi.left.isDirectory) {
                    if (fi.right) {
                        final String dirPath = paths.peek() + fi.left.name;
                        if (filter == null || filter.test(fi.left)) {
                            result.add(new ImmutablePair<>(fi.left, dirPath));
                        }
                        paths.add(dirPath + "/");
                    } else {
                        paths.pop();
                    }
                }
                if (!fi.left.isDirectory && (filter == null || filter.test(fi.left))) {
                    result.add(new ImmutablePair<>(fi.left, paths.peek() + fi.left.name));
                }
                return TreeWalkResult.CONTINUE;
            });
            cLog.add("#e:%d", result.size());
            return result;
        }
    }
Collection of higher-level utility functions for Folders.
<br>
Since Folders can be based several base types (Files, DOcuments etc) they can be used uniquely
for all those types
main/src/main/java/cgeo/geocaching/storage/FolderUtils.java