Checks whether a specific file (e.g., `account_tree.Rds`, lock file, etc.)
exists for a given user by delegating to a backend-specific plugin.
Usage
user_file_exists(user_id, file_name = "account_tree.Rds")
Arguments
- user_id
A string representing the unique user ID.
- file_name
Name of the file to check, relative to the user's folder.
Defaults to `"account_tree.Rds"`.
Value
A logical value: `TRUE` if the file exists, `FALSE` otherwise.
Details
This function supports checking files stored in different storage backends
such as local disk, MongoDB, Google Drive, etc., as configured via the
`ACCOUNT_BACKEND` environment variable.
Examples
if (FALSE) { # \dontrun{
user_file_exists("user123") # Checks account_tree.Rds by default
user_file_exists("user123", file_name = "account_tree.lock")
} # }