pub fn symlinkat<Fd: AsFd, P1: ?Sized + NixPath, P2: ?Sized + NixPath>(
path1: &P1,
dirfd: Fd,
path2: &P2,
) -> Result<()>
Expand description
Creates a symbolic link to path1
in the path specified by dirfd
and
path2
.
§Examples
Assume file foo
exists in the current working directory, create a symlink
to it:
use nix::fcntl::AT_FDCWD;
use nix::unistd::symlinkat;
symlinkat("foo", AT_FDCWD, "link_to_foo").unwrap();
§References
POSIX