private static Stream<Path> findDirectories(final Path path) throws IOException {
        return Files.find(path, 1,
                        (aPath, basicFileAttributes) -> {
                            LOGGER.trace(() -> LogUtil.message("aPath: {}, isDirectory {}",
                                    aPath, basicFileAttributes.isDirectory()));
                            if (basicFileAttributes.isDirectory()) {
                                return true;
                            } else {
                                LOGGER.warn(() -> LogUtil.message(
                                        "Found unexpected file '{}'. It will be ignored.",
                                        LogUtil.path(aPath)));
                                return false;
                            }
                        })
                .filter(aPath -> !path.equals(aPath));  // ignore the start path which Files.find includes
    }
MUST be called within a try-with-resources block.
Find all direct child directories in path.
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/NumberedDirProvider.java