Read and return the file contents as text.
(
self, encoding: str | None = None, errors: str | None = None
)
| 125 | # File I/O operations |
| 126 | |
| 127 | async def read_text( |
| 128 | self, encoding: str | None = None, errors: str | None = None |
| 129 | ) -> str: |
| 130 | """Read and return the file contents as text.""" |
| 131 | return await asyncio.to_thread(self._path.read_text, encoding, errors) |
| 132 | |
| 133 | async def read_bytes(self) -> bytes: |
| 134 | """Read and return the file contents as bytes.""" |
no outgoing calls