go-shutil
go-shutil copied to clipboard
Add copy-on-write support for BTRFS filesystem
After this change CopyFile try make copy-on-write (constant time) file copy on BTRFS filesystem. If copy-on-write operation is not supported - failback to byte-to-byte file copy.
This command works like:
cp --reflink=auto src.txt dst.txt
For this change I use https://github.com/wertarbyte/coreutils/blob/master/src/copy.c as reference.