MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / write_bytes_async

Function write_bytes_async

lightx2v/utils/async_io.py:72–83  ·  view source on GitHub ↗
(path: Union[str, Path], data: bytes)

Source from the content-addressed store, hash-verified

70
71
72async 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

Calls 4

openMethod · 0.80
writeMethod · 0.80
debugMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected