xref: /phasta/phSolver/common/mkdir_mod.f (revision 06d45c3e23cf9519431c2d5c7bbad33ddf2fbe7a)
1      module mkdir_mod
2        implicit none
3        interface
4          integer function c_mkdir(path) bind(C, name="ph_mkdir")
5            use iso_c_binding
6            character(c_char) :: path(*)
7          end function
8        end interface
9        contains
10        subroutine mkdir(path, err)
11          use iso_c_binding
12          character(len=*) :: path
13          integer, optional, intent(out) :: err
14          integer :: loc_err
15          loc_err = c_mkdir(path//c_null_char)
16          if( present(err) ) err = loc_err
17        end subroutine
18      end module mkdir_mod
19