Write text data to the file.
(
self,
data: str,
encoding: str | None = None,
errors: str | None = None,
newline: str | None = None,
)
| 135 | return await asyncio.to_thread(self._path.read_bytes) |
| 136 | |
| 137 | async def write_text( |
| 138 | self, |
| 139 | data: str, |
| 140 | encoding: str | None = None, |
| 141 | errors: str | None = None, |
| 142 | newline: str | None = None, |
| 143 | ) -> int: |
| 144 | """Write text data to the file.""" |
| 145 | return await asyncio.to_thread( |
| 146 | self._path.write_text, data, encoding, errors, newline |
| 147 | ) |
| 148 | |
| 149 | async def write_bytes(self, data: bytes) -> int: |
| 150 | """Write bytes data to the file.""" |
no outgoing calls