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

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

#943 in Filesystem

Download history 401/week @ 2023-12-04 469/week @ 2023-12-11 424/week @ 2023-12-18 250/week @ 2023-12-25 479/week @ 2024-01-01 481/week @ 2024-01-08 293/week @ 2024-01-15 367/week @ 2024-01-22 262/week @ 2024-01-29 243/week @ 2024-02-05 525/week @ 2024-02-12 707/week @ 2024-02-19 797/week @ 2024-02-26 386/week @ 2024-03-04 308/week @ 2024-03-11 437/week @ 2024-03-18

1,947 downloads per month
Used in 10 crates (6 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

~215KB