Crate reflink_copy

Source
Expand description

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.

Note: On Windows, the integrity information features are only available on Windows Server editions starting from Windows Server 2012. Client versions of Windows do not support these features. More Information

As soon as other OSes support the functionality, support will be added.

Enums§

Functions§

  • Checks whether reflink is supported on the filesystem for the specified source and target paths.
  • Copies a file using COW semantics.
  • Attempts to reflink a file. If the operation fails, a conventional copy operation is attempted as a fallback.