private boolean isEmpty()

in src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java [328:337]


    private boolean isEmpty(Path directory) {
        if (!Files.isDirectory(directory)) {
            return true;
        }
        try (Stream<Path> children = Files.list(directory)) {
            return !children.findAny().isPresent();
        } catch (IOException e) {
            throw new MavenArchiverException("Unable to access directory", e);
        }
    }