Function
stat_inner
(
file: OsPathOrFd<'_>,
dir_fd: DirFd<'_, { STAT_DIR_FD as usize }>,
follow_symlinks: FollowSymlinks,
)
Source from the content-addressed store, hash-verified
| 1393 | |
| 1394 | #[cfg(windows)] |
| 1395 | fn stat_inner( |
| 1396 | file: OsPathOrFd<'_>, |
| 1397 | dir_fd: DirFd<'_, { STAT_DIR_FD as usize }>, |
| 1398 | follow_symlinks: FollowSymlinks, |
| 1399 | ) -> io::Result<Option<StatStruct>> { |
| 1400 | // TODO: replicate CPython's win32_xstat |
| 1401 | let [] = dir_fd.0; |
| 1402 | match file { |
| 1403 | OsPathOrFd::Path(path) => crate::windows::win32_xstat(&path.path, follow_symlinks.0), |
| 1404 | OsPathOrFd::Fd(fd) => crate::common::fileutils::fstat(fd), |
| 1405 | } |
| 1406 | .map(Some) |
| 1407 | } |
| 1408 | |
| 1409 | #[cfg(not(windows))] |
| 1410 | fn stat_inner( |
Tested by
no test coverage detected