path_exists.f90 Source File


This file depends on

sourcefile~~path_exists.f90~~EfferentGraph sourcefile~path_exists.f90 path_exists.f90 sourcefile~input.f90 input.f90 sourcefile~path_exists.f90->sourcefile~input.f90 sourcefile~io.f90 io.f90 sourcefile~input.f90->sourcefile~io.f90 sourcefile~grid.f90 grid.f90 sourcefile~io.f90->sourcefile~grid.f90 sourcefile~mpimod.f90 mpimod.F90 sourcefile~io.f90->sourcefile~mpimod.f90 sourcefile~phys_consts.f90 phys_consts.F90 sourcefile~io.f90->sourcefile~phys_consts.f90 sourcefile~pathlib.f90 pathlib.f90 sourcefile~io.f90->sourcefile~pathlib.f90 sourcefile~grid.f90->sourcefile~mpimod.f90 sourcefile~grid.f90->sourcefile~phys_consts.f90 sourcefile~mesh.f90 mesh.f90 sourcefile~grid.f90->sourcefile~mesh.f90 sourcefile~reader.f90 reader.f90 sourcefile~grid.f90->sourcefile~reader.f90 sourcefile~mpimod.f90->sourcefile~phys_consts.f90 sourcefile~mesh.f90->sourcefile~phys_consts.f90 sourcefile~reader.f90->sourcefile~phys_consts.f90

Contents

Source Code


Source Code

submodule (io:input) path_exists
!! this is for non-Intel compilers
implicit none

contains

module procedure assert_directory_exists
!! throw error if directory does not exist
!! this accomodates non-Fortran 2018 error stop with variable character

logical :: exists

inquire(file=path, exist=exists)

if (.not.exists) then
  write(stderr,*) path // ' directory does not exist'
  error stop
endif

end procedure assert_directory_exists

end submodule path_exists