Function cacache::copy_unchecked
source · pub async fn copy_unchecked<P, K, Q>(cache: P, key: K, to: Q) -> Result<()>where
P: AsRef<Path>,
K: AsRef<str>,
Q: AsRef<Path>,Expand description
Copies cache data to a specified location. Cache data will not be checked during copy.
On platforms that support it, this will create a copy-on-write “reflink” with a full-copy fallback.
Example
use async_std::prelude::*;
use async_attributes;
#[async_attributes::main]
async fn main() -> cacache::Result<()> {
cacache::copy_unchecked("./my-cache", "my-key", "./data.txt").await?;
Ok(())
}