omnipath_cache_set_ext {OmnipathR} | R Documentation |
Sets the file extension for a cache record
omnipath_cache_set_ext(key, ext)
key |
Character: key for a cache item, alternatively a version entry. |
ext |
Character: the file extension, e.g. "zip". |
Returns 'NULL'.
bioc_url <- 'https://bioconductor.org/' version <- omnipath_cache_latest_or_new(url = bioc_url) version$path # [1] "/home/denes/.cache/OmnipathR/41346a00fb20d2a9df03-1" httr::GET(bioc_url, httr::write_disk(version$path, overwrite = TRUE)) key <- omnipath_cache_key(url = bioc_url) omnipath_cache_set_ext(key = key, ext = 'html') version <- omnipath_cache_latest_or_new(url = bioc_url) version$path # [1] "/home/denes/.cache/OmnipathR/41346a00fb20d2a9df03-1.html" record <- omnipath_cache_get(url = bioc_url) record$ext # [1] "html" omnipath_cache_remove(url = bioc_url) # cleaning up