[][src]Function cached_path::cached_path

pub async fn cached_path<'_>(resource: &'_ str) -> Result<PathBuf, Error>

Try downloading and caching a static HTTP resource. If successful, the return value is the local path to the cached resource. This function will always check the ETAG of the resource to ensure the latest version is cached.

This also works for local files, in which case the return value is just the original path.