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)
| 262 | |
| 263 | @staticmethod |
| 264 | def read(uri: str) -> bytes: |
| 265 | """Read data from a given ``filepath`` with 'rb' mode. |
| 266 | |
| 267 | Args: |
| 268 | filepath (str or Path): Path to read data. |
| 269 | |
| 270 | Returns: |
| 271 | bytes: Expected bytes object. |
| 272 | """ |
| 273 | storage = File._get_storage(uri) |
| 274 | return storage.read(uri) |
| 275 | |
| 276 | @staticmethod |
| 277 | def read_text(uri: Union[str, Path], encoding: str = 'utf-8') -> str: |