pub fn fetch_data(
filename: &str,
registry_entry: Option<&RegistryEntry>,
) -> Result<PathBuf, String>
Expand description
Fetch a dataset file from either cache or download it from the URL
This function will:
- Check if the file exists in the cache directory
- If not, download it from the URL in the registry entry
- Store it in the cache directory
- Return the path to the cached file
§Arguments
filename
- The name of the file to fetchregistry_entry
- Optional registry entry containing URL and SHA256 hash
§Returns
Ok(PathBuf)
- Path to the cached fileErr(String)
- Error message if fetching fails