Skip to main content

create_symlink_if_missing

Function create_symlink_if_missing 

Source
pub fn create_symlink_if_missing(target: &Path, link: &Path) -> Result<bool>
Expand description

Create a symlink if it doesn’t already exist.

Returns Ok(true) if the symlink was created, Ok(false) if it already existed. This is useful for idempotent symlink creation (e.g., enabling systemd services).