fs_extra
fs_extra copied to clipboard
Request: reflink
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.
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.
The advantages of reflink:
- It is faster to reflink big files than to copy big files.
- It is faster to reflink many files recursively than to copy many files recursively.
- It saves disk spaces.
Also increases longevity of your hard drive (probably negligible, but still). I would expect this to be the default, like it is in cp