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

Function read_bytes_async

lightx2v/utils/async_io.py:63–69  ·  view source on GitHub ↗
(path: Union[str, Path])

Source from the content-addressed store, hash-verified

61
62
63async def read_bytes_async(path: Union[str, Path]) -> bytes:
64 try:
65 async with aiofiles.open(path, "rb") as f:
66 return await f.read()
67 except Exception as e:
68 logger.error(f"Failed to read bytes from {path}: {e}")
69 raise
70
71
72async def write_bytes_async(path: Union[str, Path], data: bytes):

Callers

nothing calls this directly

Calls 2

openMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected