Newer
Older
#' @description
#' This function is intented to be called by the same name function
#' in the fairify project.
#'
#'
#' @details
#' Raises an error if the deleting failed.
#'
#'
#' @inheritParams getDataPath
#'
#' @return This function is only used for side effect.
#' @export
#'
#'
cleanDataCache <- function(cache) {
r <- unlink(cache, recursive = TRUE, force = TRUE)
if (r != 0) stop("Clean data cache failed in folder: ", cache)
invisible()
}