Download and cache a file using BiocFileCache

cacheURL(
  url,
  fileName = basename(url),
  pkg = packageName(),
  update = FALSE,
  ask = FALSE,
  verbose = TRUE
)

Arguments

url

character(1). Uniform Resource Locator (URL).

fileName

character(1). File name to store internally in BiocFileCache. Defaults to basename of URL.

pkg

character(1). Package name.

update

logical(1). Call bfcneedsupdate internally to see if URL needs an update. Doesn't work reliably for all servers, so disabled by default.

ask

logical(1). Ask if package cache needs to be created or if file needs to be updated.

verbose

logical(1). Run the function with verbose output.

Value

character(1). Cached file path on disk.

Note

Updated 2020-10-06.

Examples

url <- pasteURL( pipetteTestsURL, "biocfilecache-test.txt", protocol = "none" ) file <- cacheURL(url)
#> → Caching URL at <https://tests.acidgenomics.com/pipette/v0.4/biocfilecache-test.txt>.
print(file)
#> [1] "/Users/mike/Library/Caches/pipette/185e5813f6f9_biocfilecache-test.txt"