(
file: OsPathOrFd<'_>,
dir_fd: DirFd<'_, { STAT_DIR_FD as usize }>,
follow_symlinks: FollowSymlinks,
vm: &VirtualMachine,
)
| 1453 | #[pyfunction] |
| 1454 | #[pyfunction(name = "fstat")] |
| 1455 | fn stat( |
| 1456 | file: OsPathOrFd<'_>, |
| 1457 | dir_fd: DirFd<'_, { STAT_DIR_FD as usize }>, |
| 1458 | follow_symlinks: FollowSymlinks, |
| 1459 | vm: &VirtualMachine, |
| 1460 | ) -> PyResult { |
| 1461 | let stat = stat_inner(file.clone(), dir_fd, follow_symlinks) |
| 1462 | .map_err(|err| OSErrorBuilder::with_filename(&err, file, vm))? |
| 1463 | .ok_or_else(|| crate::exceptions::cstring_error(vm))?; |
| 1464 | Ok(StatResultData::from_stat(&stat, vm).to_pyobject(vm)) |
| 1465 | } |
| 1466 | |
| 1467 | #[pyfunction] |
| 1468 | fn lstat( |
no test coverage detected