Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotSupported = errors.New("cow is not supported on this OS") ErrFailed = errors.New("cow is not supported on this OS or file") ErrTooSmall = errors.New("file is too smaller then filesystem block size") )
ErrNotSupported is returned by Always() if the operation is not supported on the current operating system. Auto() will never return this error.
Functions ¶
func DedupeFiles ¶
func Reflink ¶
Reflink performs the reflink operation on the passed files, replacing dst's contents with src. If fallback is true and reflink fails, copy_file_range will be used first, and if that fails too io.Copy will be used to copy the data.
func ReflinkRange ¶
func ReflinkRange(ctx context.Context, dst, src *os.File, dstOffset, srcOffset, n int64, fallback bool) error
ReflinkRange performs a range reflink operation on the passed files, replacing part of dst's contents with data from src. If fallback is true and reflink fails, copy_file_range will be used first, and if that fails too io.CopyN will be used to copy the data.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.