Learn R Programming

redcapAPI (version 2.7.4)

exportFileRepositoryListing: Export a Listing of Folders and Files in the File Repository

Description

Exports a list of folders and files saved to the file repository. Includes an option to explore folders recursively.

Usage

exportFileRepositoryListing(
  rcon,
  folder_id = numeric(0),
  recursive = FALSE,
  ...
)

# S3 method for redcapApiConnection exportFileRepositoryListing( rcon, folder_id = numeric(0), recursive = FALSE, ..., error_handling = getOption("redcap_error_handling"), config = list(), api_param = list() )

Arguments

rcon

a redcapConnection object.

folder_id

integerish with maximum length 1. the folder ID of a specific folder in the File Repository for which you wish to export a list of its files and sub-folders. By default, the top-level directory of the File Repository will be used.

recursive

logical(1). When TRUE, content of subfolders will be retrieved until a full listing is produced. If FALSE, only the contents of the requested folder will be returned.

...

Additional arguments to be passed between methods

error_handling

An option for how to handle errors returned by the API. see redcap_error

config

list Additional configuration parameters to pass to POST. These are appended to any parameters in rcon$config.

api_param

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.

Author

Cole Beck

Details

This method allows you to export a list of all files and sub-folders from a specific folder in a project's File Repository. Each sub-folder will have an associated folder_id number, and each file will have an associated doc_id number.