cap_primitives::fs

Function symlink

Source
pub fn symlink(old_path: &Path, new_start: &File, new_path: &Path) -> Result<()>
Expand description

Perform a symlinkat-like operation, ensuring that the resolution of the path never escapes the directory tree rooted at start. An error is returned if the target path is absolute.