Write data to a given ``filepath`` with 'wb' mode. Note: ``write`` will create a directory if the directory of ``filepath`` does not exist. Args: obj (bytes): Data to be written. filepath (str or Path): Path to write data.
(obj: bytes, uri: Union[str, Path])
| 367 | |
| 368 | @staticmethod |
| 369 | def write(obj: bytes, uri: Union[str, Path]) -> None: |
| 370 | """Write data to a given ``filepath`` with 'wb' mode. |
| 371 | |
| 372 | Note: |
| 373 | ``write`` will create a directory if the directory of ``filepath`` |
| 374 | does not exist. |
| 375 | |
| 376 | Args: |
| 377 | obj (bytes): Data to be written. |
| 378 | filepath (str or Path): Path to write data. |
| 379 | """ |
| 380 | storage = File._get_storage(uri) |
| 381 | return storage.write(obj, uri) |
| 382 | |
| 383 | @staticmethod |
| 384 | def write_text(obj: str, uri: str, encoding: str = "utf-8") -> None: |
no test coverage detected