fdoc

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

NameTypeIntentAttributesDescription
pathcharacter(len=*)in

the directory

statintegerout

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

Graphs

Calls

Called by