Function clone_file

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

Clone a file using the FICLONE syscall

This is mainly tested on the btrfs filesystem.

For the details on the limitations of this method, see man 2 ioctl_ficlonerange.