mmeval.fileio.get¶
- mmeval.fileio.get(filepath: Union[str, pathlib.Path], backend_args: Optional[dict] = None) → bytes[源代码]¶
Read bytes from a given
filepath
with ‘rb’ mode.- 参数
filepath (str or Path) – Path to read data.
backend_args (dict, optional) – Arguments to instantiate the corresponding backend. Defaults to None.
- 返回
Expected bytes object.
- 返回类型
bytes
实际案例
>>> filepath = '/path/of/file' >>> get(filepath) b'hello world'