public static boolean isEmptyDirectory(final Path path) throws IOException {
        Objects.requireNonNull(path);
        if (Files.isDirectory(path)) {
            try (final Stream<Path> pathStream = Files.list(path)) {
                return pathStream.findAny().isEmpty();
            }
        } else {
            return false;
        }
    }
@return True if path contains no files or directories.
@throws IOException if it is unable to list the contents of path
stroom-util/src/main/java/stroom/util/io/FileUtil.java