Checks if file exists, considering also the file discovery mechanism.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | file_name |
FUNCTION file_exists(file_name) RESULT(exist) !! Checks if file exists, considering also the file discovery mechanism. CHARACTER(LEN=*), INTENT(IN) :: file_name LOGICAL :: exist INQUIRE (FILE=TRIM(file_name), exist=exist) END FUNCTION file_exists