write_dir_fn: Write 'dir' helper function that are robust to dev vs...

View source: R/utils_file_io.R

write_dir_fnR Documentation

Write dir helper function that are robust to dev vs deployed package states

Description

Write dir helper function that are robust to dev vs deployed package states

Usage

write_dir_fn(
  outfile = "R/utils_dir_fns.R",
  overwrite = TRUE,
  for_golem = file.exists("R/app_ui.R"),
  ...
)

Arguments

outfile

chr path to file to write. Default R/utils_dir_fns.R

overwrite

lgl Whether to overwrite the existing file. Default TRUE

for_golem

lgl Whether to use the app_sys function if package is a golem package

...

named directory path vectors Other dir functions to write in the form of dir_function_name = c('dir1', 'nesteddir2') where dir_function_name is the name of the function under dirs and a vector of folder names. eg for a dirs function that accesses data/plots, the argument will be plots = c('data', 'plots').

Value

msg and a new file

See Also

Other file IO: col_types(), dep_read(), dep_write(), dir_fn(), dirs, ext(), file_fn(), is_filepath(), last_updated(), list.files2(), load_obj(), make_names(), mkpath(), move_files_to_folder(), needs_update(), object_fn(), object_write(), package_size(), write_lines()


yogat3ch/UU documentation built on May 31, 2024, 10:14 p.m.