RosettaCodeData/Task/Check-that-file-exists/Fortran/check-that-file-exists-2.f
2023-07-01 13:44:08 -04:00

9 lines
224 B
Fortran

logical :: dir_e
! a trick to be sure docs is a dir
inquire( file="./docs/.", exist=dir_e )
if ( dir_e ) then
write(*,*), "dir exists!"
else
! workaround: it calls an extern program...
call system('mkdir docs')
end if