Skip to contents

The configuration object controls the behaviour of the bowerbird synchronization process, run via bb_sync(my_config). The configuration object defines the data sources that will be synchronized, where the data files from those sources will be stored, and a range of options controlling how the synchronization process is conducted. The parameters provided here are repository-wide settings, and will affect all data sources that are subsequently added to the configuration.

Usage

bb_config(
  local_file_root,
  wget_global_flags = list(restrict_file_names = "windows", progress = "dot:giga"),
  target_s3_args = list(),
  http_proxy = NULL,
  ftp_proxy = NULL,
  clobber = 1
)

Arguments

local_file_root

string: location of data repository on local file system

wget_global_flags

list: wget flags that will be applied to all data sources that call bb_wget. These will be appended to the data-source-specific wget flags provided via the source's method argument

target_s3_args

list: arguments to pass to aws.s3 function calls. Will be used for all data sets that are uploading to s3 targets

http_proxy

string: URL of HTTP proxy to use e.g. 'http://your.proxy:8080' (NULL for no proxy)

ftp_proxy

string: URL of FTP proxy to use e.g. 'http://your.proxy:21' (NULL for no proxy)

clobber

numeric: 0=do not overwrite existing files, 1=overwrite if the remote file is newer than the local copy, 2=always overwrite existing files

Value

configuration object

Details

Note that the local_file_root directory need not actually exist when the configuration object is created, but when bb_sync is run, either the directory must exist or create_root=TRUE must be passed (i.e. bb_sync(...,create_root=TRUE)).

See also

Examples

if (FALSE) { # \dontrun{
  cf <- bb_config("/my/file/root") %>%
    bb_add(bb_example_sources())

  ## save to file
  saveRDS(cf,file="my_config.rds")
  ## load previously saved config
  cf <- readRDS(file="my_config.rds")
} # }