[][src]Crate reflink

Some file systems implement COW (copy on write) functionality in order to speed up file copies. On a high level, the new file does not actually get copied, but shares the same on-disk data with the source file. As soon as one of the files is modified, the actual copying is done by the underlying OS.

This library exposes a single function, reflink, which attempts to copy a file using the underlying OSs' block cloning capabilities. The function signature is identical to std::fs::copy.

At the moment Linux, Android, OSX, ios and Windows are supported. As soon as other OS support the functionality, support will be added.

Functions

reflink

Copies a file using COW semantics.

reflink_or_copy

Attempts to reflink a file. If the operation fails, a conventional copy operation is attempted as a fallback.