Delete directory using system OS remove directory commands
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | is_unix | |||
character(len=*), | intent(in) | :: | dir | |||
logical, | intent(in), | optional | :: | echo |
subroutine os_delete_dir(is_unix, dir, echo) logical, intent(in) :: is_unix character(len=*), intent(in) :: dir logical, intent(in), optional :: echo if (is_unix) then call run('rm -rf ' // dir, echo=echo,verbose=.false.) else call run('rmdir /s/q ' // dir, echo=echo,verbose=.false.) end if end subroutine os_delete_dir