Read some bytes from the file. To be awaitable, compatible with async, this is run in threadpool.
(
self,
size: Annotated[
int,
Doc(
"""
The number of bytes to read from the file.
"""
),
] = -1,
)
| 84 | return await super().write(data) |
| 85 | |
| 86 | async def read( |
| 87 | self, |
| 88 | size: Annotated[ |
| 89 | int, |
| 90 | Doc( |
| 91 | """ |
| 92 | The number of bytes to read from the file. |
| 93 | """ |
| 94 | ), |
| 95 | ] = -1, |
| 96 | ) -> bytes: |
| 97 | """ |
| 98 | Read some bytes from the file. |
| 99 | |
| 100 | To be awaitable, compatible with async, this is run in threadpool. |
| 101 | """ |
| 102 | return await super().read(size) |
| 103 | |
| 104 | async def seek( |
| 105 | self, |
no outgoing calls