This method allows you to import multiple files into a
project's File Repository. The files may be stored in a specific folder
in the File Repository if a folder_id
is provided.
importFileRepository(rcon, dir, folder_id = numeric(0), ...)# S3 method for redcapApiConnection
importFileRepository(
rcon,
dir,
folder_id = numeric(0),
dag_id = numeric(0),
role_id = numeric(0),
recursive = FALSE,
...,
refresh = TRUE,
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()
)
A redcap connection object.
character(1)
A directory on the local system with the
files to be imported to the File Repository.
integerish(0/1)
. The ID of the folder into which
the file is to be imported. If length is zero, it is imported to the
top-level folder.
Additional arguments to be passed between methods
integerish(0/1)
The ID of a data access group. If
provided, access to the folder will be restricted to the DAG.
integerish(0/1)
The ID of a role. If provided,
access to the folder will be restricted to users with that role.
logical(1)
. If FALSE
, only the files in
the immediate directory are loaded to the File Repository. If TRUE
subfolders and their contents will also be added.
logical(1)
When TRUE
(default), the cached
File Repository data on rcon
will be refreshed.
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