Open KSXGitHub opened 1 year ago
By default, the cp command on Linux will attempt to reflink on Copy-on-Write filesystems (--reflink=auto). I think the CopyOptions struct should have similar option.
cp
--reflink=auto
CopyOptions
For example, if CopyOptions::reflink is set to RefLink::Auto, the copy function will use the reflink_or_copy function from the reflink crate to copy files.
CopyOptions::reflink
RefLink::Auto
copy
reflink_or_copy
reflink
The advantages of reflink:
Also increases longevity of your hard drive (probably negligible, but still). I would expect this to be the default, like it is in cp
By default, the
cp
command on Linux will attempt to reflink on Copy-on-Write filesystems (--reflink=auto
). I think theCopyOptions
struct should have similar option.For example, if
CopyOptions::reflink
is set toRefLink::Auto
, thecopy
function will use thereflink_or_copy
function from thereflink
crate to copy files.The advantages of reflink: