If a file does not exist, FALSE is returned.
FALSE
isDirectory(...)
...
[character(1)] File names, all strings.
character(1)
[logical].
logical
print(isDirectory(tempdir()))
## [1] TRUE
print(isDirectory(tempfile()))
## [1] FALSE