Function
write_bytes_async
(path: Union[str, Path], data: bytes)
Source from the content-addressed store, hash-verified
| 70 | |
| 71 | |
| 72 | async def write_bytes_async(path: Union[str, Path], data: bytes): |
| 73 | try: |
| 74 | path = Path(path) |
| 75 | path.parent.mkdir(parents=True, exist_ok=True) |
| 76 | |
| 77 | async with aiofiles.open(path, "wb") as f: |
| 78 | await f.write(data) |
| 79 | |
| 80 | logger.debug(f"Bytes written to {path}") |
| 81 | except Exception as e: |
| 82 | logger.error(f"Failed to write bytes to {path}: {e}") |
| 83 | raise |
Callers
nothing calls this directly
Tested by
no test coverage detected