Handle file operations with proper error messages

check_file(path, operation = "read", must_exist = TRUE)

Arguments

path

File path

operation

Operation being performed (read, write, etc.)

must_exist

Whether the file must exist

Value

Invisible TRUE if operation can proceed, throws error otherwise