reflink 0.1.3

copy-on-write mechanism on supported file systems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[cfg(unix)] mod unix;
#[cfg(unix)] pub use self::unix::reflink;
#[cfg(windows)] mod windows;
#[cfg(windows)] pub use self::windows::reflink;
#[cfg(not(any(unix, windows)))] mod others;
#[cfg(not(any(unix, windows)))] pub use self::others::reflink;

fn _reflink_not_supported() -> std::io::Result<()> {
    return Err(std::io::Error::new(
        std::io::ErrorKind::Other,
        format!("Operation not supported on {}-{}-{}",
                std::env::consts::ARCH,
                std::env::consts::OS,
                std::env::consts::FAMILY
               ),
    ));
}