Skip to main content

Copy files shipped in a package into a working directory

Description

Used by the ’copy_*()’ helpers of prolfquapp and of the packages built on it (prophosqua, prolfquasaint) to copy run scripts and report templates out of the installed package.

Usage

script_copy_helper_vec(
  runscripts,
  workdir = getwd(),
  packagename = "prolfquapp",
  overwrite = TRUE
)

Arguments

runscripts paths of the files, relative to the package’s installation directory
workdir directory to copy the files to, default the working directory
packagename package to copy the files from
overwrite overwrite existing files in ‘workdir’, default TRUE

Value

paths of the copied files; a file that is missing or cannot be copied gives a warning and is left out

Examples

library("prolfquapp")

copied <- script_copy_helper_vec("DESCRIPTION", workdir = tempdir(), packagename = "prolfquapp")
basename(copied)
[1] "DESCRIPTION"