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

Function read_text_async

lightx2v/utils/async_io.py:36–42  ·  view source on GitHub ↗
(path: Union[str, Path], encoding: str = "utf-8")

Source from the content-addressed store, hash-verified

34
35
36async def read_text_async(path: Union[str, Path], encoding: str = "utf-8") -> str:
37 try:
38 async with aiofiles.open(path, "r", encoding=encoding) as f:
39 return await f.read()
40 except Exception as e:
41 logger.error(f"Failed to read text from {path}: {e}")
42 raise
43
44
45async def write_text_async(path: Union[str, Path], content: str, encoding: str = "utf-8"):

Callers

nothing calls this directly

Calls 2

openMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected