tests/testthat/helper-file-exists.R

exist_file <- tempfile()
file.create(exist_file)

bad_file <- tempfile()

exist_file_list <- purrr::map(1:3, ~{tempfile()}) %T>%
  purrr::map(file.create)

exist_file_vector <- unlist(exist_file_list)

Try the cmdfun package in your browser

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

cmdfun documentation built on Oct. 23, 2020, 8:12 p.m.