fast_rustc_ap_rustc_fs_util

Function link_or_copy

Source
pub fn link_or_copy<P: AsRef<Path>, Q: AsRef<Path>>(
    p: P,
    q: Q,
) -> Result<LinkOrCopy>
Expand description

Copies p into q, preferring to use hard-linking if possible. If q already exists, it is removed first. The result indicates which of the two operations has been performed.