Function cargo_util::paths::link_or_copy

source ·
pub fn link_or_copy(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> Result<()>
Expand description

Hardlink (file) or symlink (dir) src to dst if possible, otherwise copy it.

If the destination already exists, it is removed before linking.