#copy #cow #btrfs #file-copy #xfs

reflink

copy-on-write mechanism on supported file systems

4 releases

0.1.3 Apr 2, 2019
0.1.2 Aug 13, 2018
0.1.1 Aug 10, 2018
0.1.0 Aug 10, 2018

#960 in Filesystem

Download history 670/week @ 2024-07-21 672/week @ 2024-07-28 712/week @ 2024-08-04 2130/week @ 2024-08-11 2433/week @ 2024-08-18 3328/week @ 2024-08-25 3763/week @ 2024-09-01 4370/week @ 2024-09-08 5398/week @ 2024-09-15 4000/week @ 2024-09-22 4491/week @ 2024-09-29 3765/week @ 2024-10-06 2929/week @ 2024-10-13 6104/week @ 2024-10-20 5533/week @ 2024-10-27 4026/week @ 2024-11-03

18,817 downloads per month
Used in 9 crates (5 directly)

MIT/Apache

18KB
327 lines

reflink

Build Status

Cross-platform(!) COW reflink copy of files

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 supports Linux, Android, OSX, ios and Windows. As soon as other OS support the functionality, support will be added. For implementation details, visit the docs.


lib.rs:

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.

Dependencies

~220KB