pub async fn reflink<P, K, Q>(cache: P, key: K, to: Q) -> Result<()>Expand description
Creates a reflink/clonefile from a cache entry to a destination path.
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("./my-cache", "my-key", "./data.txt").await?;
Ok(())
}