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])
| 611 | |
| 612 | @staticmethod |
| 613 | def write(obj: bytes, uri: Union[str, Path]) -> None: |
| 614 | """Write data to a given ``filepath`` with 'wb' mode. |
| 615 | |
| 616 | Note: |
| 617 | ``write`` will create a directory if the directory of ``filepath`` |
| 618 | does not exist. |
| 619 | |
| 620 | Args: |
| 621 | obj (bytes): Data to be written. |
| 622 | filepath (str or Path): Path to write data. |
| 623 | """ |
| 624 | storage = File._get_storage(uri) |
| 625 | return storage.write(obj, uri) |
| 626 | |
| 627 | @staticmethod |
| 628 | def write_text(obj: str, uri: str, encoding: str = "utf-8") -> None: |
no test coverage detected