True if path is a directory (or a link to one): if it can be opened as a directory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path |
the path to test |
logical function is_directory(path) !! True if `path` is a directory (or a link to one): if it can be opened as a directory. character(len=*), intent(in) :: path !! the path to test type(c_ptr) :: dir integer :: status dir = c_opendir(c_string(path)) is_directory = c_associated(dir) if (is_directory) status = c_closedir(dir) end function is_directory