
List File Paths of REDCapSync Projects in a Folder
Source:R/projects.R
check_folder_for_projects.Rd
Searches a specified folder for files related to REDCapSync projects and
returns their file paths.
Optionally validates the folder to ensure it was previously set up using
setup_project()
.
Arguments
- file_path
Character. The path to the folder to search.
- validate
Logical. If
TRUE
, the function will only accept valid directories previously set up withsetup_project()
. Default isTRUE
.
Value
A character vector of file paths for valid REDCapSync project files in the folder. Returns an empty character vector if no valid files are found.
Details
This function checks a folder (and optionally validates its setup) for
.RData
files that correspond to REDCapSync projects.
It identifies files with the extension .RData
and names ending in
_REDCapSync
, filtering out any unrelated files.
See also
setup_project for setting up valid directories.