def from_path(cls, path: pathlib.Path) -> 'Directory':
        """
        Create a directory entity from a directory path.

        :param path: The path of the directory.
        :return: A directory entity instance representing the directory.
        :raises ValueError: If the path does not point to a directory.
        """
        if not path.is_dir():
            raise ValueError('Path does not point to a directory')
        return Directory(path.name, {entity.name: Entity.from_path(entity)
                                     for entity in path.iterdir()})