docs: def from_path(cls, path: pathlib.Path) -> 'File':
          """
          Create a file entity from a file path.
  
          :param path: The path of the file.
          :return: A file entity instance representing the file.
          :raises ValueError: If the path does not point to a file.
          """
          if not path.is_file():
              raise ValueError('Path does not point to a file')
          return File(path.name, path.stat().st_size, cls._md5(path))