Get or set the default directory for downloads and backups
formr_default_dir.Rdformr's file-writing functions (e.g. formr_backup_study(),
formr_api_backup_run(), formr_api_pull_project()) never write to your
working directory by default. Instead they default their destination to the
value stored here, which is unset (NULL) until you choose one — so nothing
is ever written until you opt in. Call this function with a path to set a
session-wide default, or without arguments to read the current value. The
path is held in memory for the current R session only; nothing is written to
disk to persist it. There is no separate reset: the value lasts until you
overwrite it with another path or your R session ends.
Examples
formr_default_dir(tempdir())
#> [1] "/tmp/RtmppKJNtH"
formr_default_dir()
#> [1] "/tmp/RtmppKJNtH"