Write dir
helper function that are robust to dev vs deployed package states
write_dir_fn.Rd
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. DefaultTRUE
- for_golem
lgl
Whether to use theapp_sys
function if package is a golem package- ...
named directory path vectors
Other dir functions to write in the form ofdir_function_name = c('dir1', 'nesteddir2')
wheredir_function_name
is the name of the function underdirs
and 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()