[−][src]Function cached_path::cached_path
pub fn cached_path(resource: &str) -> Result<PathBuf, Error>
Get the cached path to a resource.
If the resource is local file, it's path is returned. If the resource is a static HTTP resource, it will cached locally and the path to the cache file will be returned.
Internally this function just creates a default Cache
object and then
calls Cache::cached_path
.
Therefore if you're going to be calling this function multiple times,
it's probably more efficient to create and use a single Cache
instead.