tests/testthat/helper-help.R

library(stringr)

copy_file_to_temp <- function(f_name) {
  folder <- tempdir()
  f_dest <- file.path(folder, basename(f_name))
  if (file.copy(f_name, f_dest, overwrite = TRUE)) {
    f_dest
  } else {
    stop("Can't copy file to tempdir")
  }
}
wilsonfreitas/rbmfbovespa documentation built on April 13, 2025, 11:12 p.m.