make_path Subroutine

public subroutine make_path(wkd, file_path, exit_status)

Subroutine that creates the folders of a file path

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: wkd
character(len=*), intent(in) :: file_path
integer(kind=I4), intent(out) :: exit_status

Calls

proc~~make_path~~CallsGraph proc~make_path make_path proc~dir_separator dir_separator proc~make_path->proc~dir_separator proc~mkdir mkdir proc~make_path->proc~mkdir proc~is_linux is_linux proc~dir_separator->proc~is_linux

Called by

proc~~make_path~~CalledByGraph proc~make_path make_path program~test_files test_files program~test_files->proc~make_path

Source Code

   subroutine make_path(wkd, file_path, exit_status)
   !! Subroutine that creates the folders of a file path
   implicit none
   character(len = *), intent(in ) :: wkd
   character(len = *), intent(in ) :: file_path
   integer(kind = I4), intent(out) :: exit_status

      character(len = 512) :: dir
      character(len =   1) :: sep
      integer(kind = I4)   :: isep

      sep = dir_separator()

      isep = index( file_path, sep, back = .true. )

      dir = file_path(1:isep - 1)

      call mkdir(wkd = wkd, directory = trim(dir), sep = sep, exit_status = exit_status)

   return
   endsubroutine make_path