Function cacache::reflink_unchecked_sync
source · pub fn reflink_unchecked_sync<P, K, Q>(cache: P, key: K, to: Q) -> Result<()>
Expand description
Reflinks/clonefiles cache data to a specified location. Cache data will not be checked during linking.
Fails if the destination is on a different filesystem or if the filesystem does not support reflinks.
Currently, reflinks are known to work on APFS (macOS), XFS, btrfs, and ReFS (Windows DevDrive)
Example
use async_std::prelude::*;
use async_attributes;
#[async_attributes::main]
async fn main() -> cacache::Result<()> {
cacache::reflink_unchecked_sync("./my-cache", "my-key", "./data.txt")?;
Ok(())
}