Check if directory exists and is accessible

check_directory(
  path,
  create_if_missing = FALSE,
  check_write_permission = TRUE,
  arg_name = "directory"
)

Arguments

path

Directory path

create_if_missing

Whether to create directory if it doesn't exist

check_write_permission

Whether to verify write permissions

arg_name

Name of the argument for error messages

Value

Invisible TRUE if valid, throws error otherwise