pub fn copy_sync<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::Result<()> {
cacache::copy_sync("./my-cache", "my-key", "./my-hello.txt")?;
Ok(())
}