Function cacache::reflink_unchecked
source · pub async fn reflink_unchecked<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("./my-cache", "my-key", "./data.txt").await?;
Ok(())
}