(&self, _size: OptionalSize, vm: &VirtualMachine)
| 1867 | |
| 1868 | #[pymethod] |
| 1869 | fn peek(&self, _size: OptionalSize, vm: &VirtualMachine) -> PyResult<Vec<u8>> { |
| 1870 | let mut data = self.reader().lock(vm)?; |
| 1871 | let raw = data.check_init(vm)?; |
| 1872 | ensure_unclosed(raw, "peek of closed file", vm)?; |
| 1873 | |
| 1874 | if data.writable() { |
| 1875 | let _ = data.flush_rewind(vm); |
| 1876 | } |
| 1877 | data.peek(vm) |
| 1878 | } |
| 1879 | |
| 1880 | #[pymethod] |
| 1881 | fn read1(&self, size: OptionalSize, vm: &VirtualMachine) -> PyResult<Vec<u8>> { |
nothing calls this directly
no test coverage detected