check_file: Handle file operations with proper error messages
Description
Enhanced file validation with comprehensive checks and better error messages
Usage
check_file(path, operation = "read", must_exist = TRUE)
Value
Invisible TRUE if operation can proceed, throws error otherwise
Arguments
- path
File path
- operation
Operation being performed (read, write, etc.)
- must_exist
Whether the file must exist