replace_file_with_symlink

Function replace_file_with_symlink 

Source
pub fn replace_file_with_symlink(
    source: &SafePath,
    target: &SafePath,
    dry_run: bool,
    allow_degraded: bool,
    backup_tag: &str,
) -> Result<(bool, u64)>
Expand description

Atomically replace a file with a symlink, creating a backup. Emits no logs; pure mechanism. Returns Ok(true) when degraded EXDEV fallback was used (non-atomic), Ok(false) otherwise.

ยงErrors

Returns an IO error if the file cannot be replaced with a symlink or if backup creation fails.