Deletes all files in a folder of the file repository. The deletion may be applied recursively to sub-folders. Deleted files will remain in the recycling bin for up to 30 days. This function does not provide a way to delete folders.
deleteFileRepository(rcon, folder_id, recursive = FALSE, ...)# S3 method for redcapApiConnection
deleteFileRepository(
rcon,
folder_id,
recursive = FALSE,
refresh = TRUE,
...,
confirm = c("ask", "no", "yes"),
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()
)
A redcapConnection object.
integerish(1). The folder ID from which files
should be deleted. Use folder_id = 0 to delete from the top-level
folder (this is different from other File Repository methods, which
default to the top-level folder. The difference here is to prevent
deleting an entire File Repository using a default argument.)
logical(1). If TRUE, files in all subfolders
will be deleted as well.
Arguments to pass to other methods.
File Repository data on rcon will be refreshed.
logical(1). If TRUE and the file repository
confirm character. One of c("ask", "no", "yes").
When "ask", user will be prompted to confirm the deletion.
When "no", the function will terminate with no action. When
"yes", the function will proceed without confirmation (useful
for automated processes).
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