nix::unistd

Function symlinkat

source
pub fn symlinkat<P1: ?Sized + NixPath, P2: ?Sized + NixPath>(
    path1: &P1,
    dirfd: Option<RawFd>,
    path2: &P2,
) -> Result<()>
Expand description

Creates a symbolic link at path2 which points to path1.

If dirfd has a value, then path2 is relative to directory associated with the file descriptor.

If dirfd is None, then path2 is relative to the current working directory. This is identical to libc::symlink(path1, path2).

See also symlinkat(2).