Check if file already exists
Provide an error message when a file is declared for writing that already exists.
check_file_exists(file, overwrite, call = caller_env())
file
: The file that is being checkedoverwrite
: Whether the file was declared to be overwrittencall
: The calling environment to use in the error messageAn error message saying the requested file already exists
In the case of write_redcap_xlsx()
, this should only error when a file already exists and is not declared for overwite
.
Useful links