subroutinemake_directory
subroutine make_directory(path, stat)
Create directory path with those above it, if it does not exist. It is not a failure if something
else creates it first.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| path | character(len=*) | in | the directory | |
| stat | integer | out | nonzero on failure |
Calls
Source
Show the code
subroutine make_directory(path, stat)
character(len=*), intent(in) :: path !! the directory
integer, intent(out) :: stat !! nonzero on failure
if (is_windows()) then
call run_command('if not exist '//quoted_path(path)//' mkdir '//quoted_path(path), stat)
else
call run_command('mkdir -p '//quoted_path(path), stat)
end if
if (is_directory(path)) stat = 0
end subroutine make_directory