Function nc::syncfs [−][src]
Expand description
Commit filesystem cache related to fd
to disk.
let path = "/etc/passwd";
let ret = nc::openat(nc::AT_FDCWD, path, nc::O_RDONLY, 0);
assert!(ret.is_ok());
let fd = ret.unwrap();
let ret = nc::syncfs(fd);
assert!(ret.is_ok());
assert!(nc::close(fd).is_ok());