Exports all of the files in a directory in the File
Repository. This is an extension of exportFromFileRepository,
which downloads a single file and may be applied recursively to download
files in subdirectories as well.
exportFileRepository(
rcon,
folder_id,
dir = getwd(),
dir_create = FALSE,
recursive = FALSE,
...
)# S3 method for redcapApiConnection
exportFileRepository(
rcon,
folder_id = numeric(0),
dir = getwd(),
dir_create = FALSE,
recursive = FALSE,
...,
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()
)
Returns a data frame listing the files that were downloaded and the directories in which they are saved.
A redcapConnection object.
integerish(0/1) The folder ID with the files to
download. If length 0, defaults to the top-level directory.
character(1). A directory on the local system to which
the file is to be saved. Defaults to the working directory.
logical(1). Create the directory dir if it
does not already exist. Defaults to FALSE. If dir does
not exist and dir_create = FALSE, an error is thrown.
logical(1). If TRUE, export all subfolders
and their files as well
Additional arguments to be passed between methods
An option for how to handle errors returned by the API.
see redcap_error
list Additional configuration parameters to pass to
POST. These are appended to any parameters in
rcon$config.
list Additional API parameters to pass into the
body of the API call. This provides users to execute calls with options
that may not otherwise be supported by redcapAPI.
Benjamin Nutter