fs_extra icon indicating copy to clipboard operation
fs_extra copied to clipboard

Request: reflink

Open KSXGitHub opened this issue 1 year ago • 1 comments

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.

KSXGitHub avatar Jan 10 '23 05:01 KSXGitHub

Also increases longevity of your hard drive (probably negligible, but still). I would expect this to be the default, like it is in cp

xenoterracide avatar Jan 25 '24 18:01 xenoterracide