Function clone_or_copy_file

Source
pub fn clone_or_copy_file<P: AsRef<Path>, Q: AsRef<Path>>(
    src: P,
    dest: Q,
) -> Result<Option<u64>>
Expand description

Tries to clone the file with crate::clone_file, falling back to fs::copy on error

Returns Ok(None) on successful clone, Ok(Some(copied_byte_count)) on successful fs::copy.