View source: R/directory_access.R
| directory.access | R Documentation |
Validates whether a directory exists and checks its read/write access along with content counts. Supports both local and UNC network paths.
directory.access(path)
path |
Character string. Directory path to validate. |
A list of class directory_access_result containing:
path - Normalized directory path
exists - TRUE/FALSE
readable - TRUE/FALSE
writable - TRUE/FALSE
file_count - Number of files in directory
folder_count - Number of subdirectories
empty - TRUE/FALSE
status - Overall status message
# Check a temporary directory
result <- directory.access(tempdir())
print(result)
# Check a path that does not exist
result <- directory.access(
file.path(tempdir(), "no_such_folder")
)
print(result)
# UNC network path (requires network access)
directory.access("//server/share/project")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.