tests/testthat/helper-file.R

local_file <- function(ext, .local_envir = parent.frame()) {
  file <- tempfile(fileext = ext)
  writeLines("", file)
  withr::local_file(file, .local_envir = .local_envir)
  as_file(file)
}

Try the polish package in your browser

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

polish documentation built on June 3, 2026, 5:07 p.m.