R/scheme_path_index_template.R

Defines functions scheme_path_index_template

Documented in scheme_path_index_template

#' Functions to manage schemes
#'
#' @return fully qualified path to the \code{index} template file
#' @export
#'
#' @examples
#' scheme_path_index_template()
#'
scheme_path_index_template <- function() {
  schemeName <- paste0(scheme_active()$name, "_", scheme_active()$version )

  result <- list.files(
    path = file.path(cache("installedSchemes"), schemeName),
    pattern = "index.*",
    full.names = TRUE
  )

  if (length(result) == 0) {
    result <- system.file("index.md", package = "dmdScheme")
  }

  return(result)
}

Try the dmdScheme package in your browser

Any scripts or data that you put into this service are public.

dmdScheme documentation built on Aug. 22, 2022, 9:06 a.m.