exists Function

function exists(filename)

test if pathname already exists

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename

Return Value logical


Source Code

function exists(filename)
    character(len=*), intent(in) :: filename
    logical :: exists
    inquire(file=filename, exist=exists)
end function exists