Function nc::futimesat [−][src]
pub fn futimesat(
dirfd: i32,
filename: &str,
times: &[timeval_t; 2]
) -> Result<(), Errno>
Expand description
Change timestamp of a file relative to a directory file discriptor.
let path = "/tmp/nc-futimesat"; let ret = nc::open(path, nc::O_WRONLY | nc::O_CREAT, 0o644); assert!(ret.is_ok()); let fd = ret.unwrap(); assert!(nc::close(fd).is_ok()); let times = [ nc::timeval_t { tv_sec: 100, tv_usec: 0, }, nc::timeval_t { tv_sec: 10, tv_usec: 0, }, ]; let ret = nc::futimesat(nc::AT_FDCWD, path, ×); assert!(ret.is_ok()); assert!(nc::unlink(path).is_ok());