pub fn fstat<Fd: AsFd>(fd: Fd) -> Result<Stat>
fstat(fd)—Queries metadata for an open file or directory.
fstat(fd)
Mode::from_raw_mode and FileType::from_raw_mode may be used to interpret the st_mode field.
Mode::from_raw_mode
FileType::from_raw_mode
st_mode