| read.access | R Documentation |
Validates whether a file or directory exists and can be accessed for reading. Supports both local and UNC network paths.
read.access(path)
path |
Character string. Full path to file or directory. |
A list of class read_access_result containing:
path - Normalized input path
exists - TRUE/FALSE
type - "File" or "Directory"
readable - TRUE/FALSE
status - Overall status message
# Check a temporary directory
result <- read.access(tempdir())
print(result)
# Check an existing temporary file
tmp <- tempfile()
writeLines("hello", tmp)
result <- read.access(tmp)
print(result)
unlink(tmp)
# Check a path that does not exist
result <- read.access(file.path(tempdir(), "no_such_file.csv"))
print(result)
# UNC network path (requires network access)
read.access("//server/share/data/file.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.