Read data from a given ``filepath`` with 'rb' mode. Args: filepath (str or Path): Path to read data. Returns: bytes: Expected bytes object.
(uri: str)
| 339 | |
| 340 | @staticmethod |
| 341 | def read(uri: str) -> bytes: |
| 342 | """Read data from a given ``filepath`` with 'rb' mode. |
| 343 | |
| 344 | Args: |
| 345 | filepath (str or Path): Path to read data. |
| 346 | |
| 347 | Returns: |
| 348 | bytes: Expected bytes object. |
| 349 | """ |
| 350 | storage = File._get_storage(uri) |
| 351 | return storage.read(uri) |
| 352 | |
| 353 | @staticmethod |
| 354 | def read_text(uri: Union[str, Path], encoding: str = "utf-8") -> str: |