R/sbdi_cache_filename.R

Defines functions sbdi_cache_filename

Documented in sbdi_cache_filename

#' Returns the name of the cache file associated with the given URL. 
#' 
#' Note that this file may not actually exist, this function just provides the mapping from URL to file name
#' 
#' @references \url{https://api.biodiversitydata.se/}
#' @seealso \code{sbdi_config} for cache settings, particularly the cache directory
#'  
#' @param url string: the URL e.g. \url{https://spatial.biodiversitydata.se/}
#' @return string: the file path and name
#' 
#' @examples
#' \dontrun{
#' sbdi_cache_filename("https://spatial.biodiversitydata.se/")
#' }
#' 
#' @export sbdi_cache_filename
sbdi_cache_filename <- function(url){
  assert_that(is.string(url))
  
  ALA4R::ala_cache_filename(url)
} 
biodiversitydata-se/SBDI4R documentation built on Feb. 23, 2024, 4:15 p.m.