MCPcopy Index your code
hub / github.com/RustPython/RustPython / stat_inner

Function stat_inner

crates/vm/src/stdlib/os.rs:1395–1407  ·  view source on GitHub ↗
(
        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(

Callers 2

inodeMethod · 0.85
statFunction · 0.85

Calls 15

win32_xstatFunction · 0.85
fstatFunction · 0.85
newFunction · 0.85
statFunction · 0.85
lstatFunction · 0.85
as_os_strMethod · 0.80
raw_optMethod · 0.80
as_mut_ptrMethod · 0.80
ErrClass · 0.50
SomeClass · 0.50
mapMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected