This function takes an expected file extension, and validates it against a user-inputted file path.
check_file_extension(fpath, expected_ext, param_nm = "fpath", raise = TRUE)Whether or not the passed file has a valid file extension.
The filepath.
The expected file extension.
The parameter name that the filepath was passed to (for error raising), Default: 'fpath'
Whether or not to raise an error, Default: TRUE