MCPcopy Index your code
hub / github.com/microsoft/playwright-python / async_readfile

Function async_readfile

playwright/_impl/_helper.py:537–543  ·  view source on GitHub ↗
(file: Union[str, Path])

Source from the content-addressed store, hash-verified

535
536
537async def async_readfile(file: Union[str, Path]) -> bytes:
538 def inner() -> bytes:
539 with open(file, "rb") as fh:
540 return fh.read()
541
542 loop = asyncio.get_running_loop()
543 return await loop.run_in_executor(None, inner)
544
545
546T = TypeVar("T")

Callers 10

registerMethod · 0.90
new_contextMethod · 0.90
add_init_scriptMethod · 0.90
set_storage_stateMethod · 0.90
add_script_tagMethod · 0.90
add_style_tagMethod · 0.90
add_init_scriptMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected