(&self, vm: &VirtualMachine)
| 1323 | #[cfg(unix)] |
| 1324 | #[pymethod] |
| 1325 | fn size(&self, vm: &VirtualMachine) -> std::io::Result<PyIntRef> { |
| 1326 | let fd = unsafe { crt_fd::Borrowed::try_borrow_raw(self.fd.load())? }; |
| 1327 | let file_len = fstat(fd)?.st_size; |
| 1328 | Ok(PyInt::from(file_len).into_ref(&vm.ctx)) |
| 1329 | } |
| 1330 | |
| 1331 | #[cfg(windows)] |
| 1332 | #[pymethod] |