Check if a file exists and remove file or error
Source:R/check_file_overwrite.R
check_file_overwrite.RdThe filename or path must include a single file extension.
Usage
check_file_overwrite(
filename = NULL,
path = NULL,
overwrite = TRUE,
quiet = FALSE,
ask = TRUE,
.envir = caller_env(),
call = caller_env()
)Arguments
- filename
File name, Default:
NULL. Optional if path is supplied.- path
File path, Default:
NULL. Optional if filename is supplied.- overwrite
If
TRUE, remove a file with the same name and path- quiet
If
TRUE, suppress informational messages, Default:FALSE- ask
If
TRUE, overwrite isFALSE, and session is interactive, ask if user wants to overwrite the file. Default:TRUE- .envir
Ignored at present.
- call
The execution environment of a currently running function, e.g.
caller_env(). The function will be mentioned in error messages as the source of the error. See thecallargument ofabort()for more information.