class BPMNDiagramProjectService implements BPMNDiagramService {

    @Override
    public ProjectType getProjectType(Path projectRootPath) {
        try (DirectoryStream<org.uberfire.java.nio.file.Path> paths =
                     ioService.newDirectoryStream(Paths.convert(projectRootPath), f -> f.getFileName().toString().startsWith("."))) {
            return ProjectType.fromFileName(StreamSupport.stream(paths.spliterator(), false)
                                                    .map(Paths::convert)
                                                    .map(Path::getFileName)
                                                    .findFirst()
            ).orElse(null);
        }
    }

    @Inject public  BPMNDiagramProjectService(final @Named("ioStrategy") IOService ioService);
    public  BPMNDiagramProjectService();

}