public IndexerDirectoryInformation parse(Path path) {
        if (!Files.exists(path)) {
            throw new IndexerInformationParserException("Path " + path + " does not exist.");
        }

        if (!Files.isDirectory(path)) {
            throw new IndexerInformationParserException("Path " + path + " is not a directory");
        }

        if (!Files.isReadable(path)) {
            throw new IndexerInformationParserException("Path " + path + " is not readable");
        }

        final Path nodesPath = path.resolve("nodes");

        if (!Files.exists(nodesPath)) {
            return IndexerDirectoryInformation.empty(path);
        }

        try (final Stream<Path> nodes = Files.list(nodesPath)) {
            final List<NodeInformation> nodeInformation = nodes.filter(Files::isDirectory)
                    .filter(p -> p.getFileName().toString().matches("\\d+"))
                    .map(this::parseNode)
                    .filter(node -> !node.isEmpty())
                    .toList();
            return new IndexerDirectoryInformation(path, nodeInformation);
        } catch (IOException e) {
            throw new IndexerInformationParserException("Failed to list nodes", e);
        }
    }
@Test
    void testEmptyDataDir(@TempDir Path tempDir) {
        final IndexerDirectoryInformation result = parser.parse(tempDir);
        Assertions.assertThat(result).isNotNull();
        Assertions.assertThat(result.nodes()).isEmpty();

    }