Function symlink
pub unsafe fn symlink<P>(old_name: P, new_name: P) -> Result<(), i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Make a new name for a file.
§Examples
let oldname = "/etc/passwd";
let newname = "/tmp/nc-symlink";
let ret = unsafe { nc::symlink(oldname, newname) };
assert!(ret.is_ok());
let ret = unsafe { nc::unlinkat(nc::AT_FDCWD, newname,0 ) };
assert!(ret.is_ok());