is.dir(dir) is.symlink(path)
When calling
is.dir
the return vector contains
TRUE
for each input name that is a directory or
FALSE
if either the name exists but is not a
directory or if the path name does not exist.
The return vector of function
is.symlink
contains
TRUE
for each input name that is a symbolic link
to a file or directory. On Windows systems, the values returned by this function
will always be
FALSE
.
The function
is.dir
returns
TRUE
if the name is a symbolic link to a directory.
On Windows systems, the value(s) returned by
is.symlink
will be
FALSE
.
if(file.exists("xyz") && !is.dir("xyz")) cat("xyz is a file but not a directory\n") if(is.dir("abc") && is.symlink("abc")) cat("abc is a link to a directory\n")