Write dir helper function that are robust to dev vs deployed package states
write_dir_fn.RdWrite 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
chrpath to file to write. Default R/utils_dir_fns.R- overwrite
lglWhether to overwrite the existing file. DefaultTRUE- for_golem
lglWhether to use theapp_sysfunction if package is a golem package- ...
named directory path vectorsOther dir functions to write in the form ofdir_function_name = c('dir1', 'nesteddir2')wheredir_function_nameis the name of the function underdirsand a vector of folder names. eg for a dirs function that accessesdata/plots, the argument will beplots = c('data', 'plots').
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()