public static void forEachChild(final Path parent,
                                    final Predicate<Path> pathPredicate,
                                    final Consumer<Path> childConsumer) {
        if (parent != null) {
            Objects.requireNonNull(childConsumer);
            try {
                try (Stream<Path> pathStream = Files.list(parent)) {
                    if (pathPredicate != null) {
                        pathStream.filter(pathPredicate)
                                .forEach(childConsumer);
                    } else {
                        pathStream.forEach(childConsumer);
                    }
                }
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        }
    }
For each path (of any type) that is a direct child of parent, call childConsumer if it
matches pathPredicate.
stroom-util/src/main/java/stroom/util/io/FileUtil.java