copy

Function copy 

Source
pub fn copy<P, K, Q>(cache: P, key: K, to: Q) -> Result<u64>
where P: AsRef<Path>, K: AsRef<str>, Q: AsRef<Path>,
Expand description

Copies a cache entry by key to a specified location. Returns the number of bytes copied.

ยงExample

use std::io::Read;

fn main() -> cacache_sync::Result<()> {
    cacache_sync::copy("./my-cache", "my-key", "./my-hello.txt")?;
    Ok(())
}