Function oneio::get_cache_reader

source ยท
pub fn get_cache_reader(
    path: &str,
    cache_dir: &str,
    cache_file_name: Option<String>,
    force_cache: bool
) -> Result<Box<dyn Read + Send>, OneIoError>
Expand description

get file reader with local cache.

parameters:

  • path: file path to open, remote or local
  • cache_dir: path str to cache directory
  • cache_file_name: optional file name for cache file, default to use the same filename as the to-read file
  • force_cache: whether to force refresh cache file if a local cache file already exists