Function rustix::fs::fstat

pub fn fstat<Fd: AsFd>(fd: &Fd) -> io::Result<Stat>
Documentation

fstat(fd)—Queries metadata for an open file or directory.

Mode::from_raw_mode and FileType::from_raw_mode may be used to interpret the st_mode field.

References