#optimized #file #file-copy #operating-systems #macos #co-w

bin+lib copy_on_write

Copy-On-Write Rust implementation

4 releases

0.1.3 Dec 13, 2023
0.1.2 Dec 12, 2023
0.1.1 Nov 2, 2023
0.1.0 Nov 1, 2023

#1010 in Filesystem

Download history 1/week @ 2024-07-21 10/week @ 2024-07-28

143 downloads per month

MIT license

30KB
635 lines

CopyOnWrite (CoW) in Rust

Status

OS File System Status
Linux btrfs E2E Linux (btrfs)
Linux xfs E2E Linux (xfs)
Windows ReFS E2E Windows (ReFS)
MacOS APFS E2E MacOS (APFS)

Note: Linux and Windows tests run in Google Cloud VMs to ensure the correct file system is used. MacOS tests run only GitHub Actions.

Description

This project is an implementation of Copy-On-Write (CoW) or reflinks in Rust. It provides file copy functionalities that are optimized for different file systems and operating systems.

Features

  • Unix/MacOS: Uses the reflink-copy crate for CoW support.
  • Windows: Native implementation supporting ReFS drives (Windows Server 2016+ and Windows 11 Dev Drives).

Usage Demo

Here's a simple demo showing how to use this library.

use copy_on_write::reflink_file_sync;

reflink_file_sync(src, dst);

Dependencies

~5–45MB
~712K SLoC