Function nc::statx [−][src]
pub fn statx(
dirfd: i32,
filename: &str,
flags: i32,
mask: u32,
buf: &mut statx_t
) -> Result<(), Errno>
Expand description
Get file status about a file (extended).
let path = "/etc/passwd"; let mut statx = nc::statx_t::default(); let ret = nc::statx(nc::AT_FDCWD, path, nc::AT_SYMLINK_NOFOLLOW, nc::STATX_TYPE, &mut statx); assert!(ret.is_ok()); // Check fd is a regular file. assert_eq!((statx.stx_mode as u32 & nc::S_IFMT), nc::S_IFREG);