Subroutine that creates the folders of a file path
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | wkd | |||
character(len=*), | intent(in) | :: | file_path | |||
integer(kind=I4), | intent(out) | :: | exit_status |
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