File: example_remove_directory.f90

package info (click to toggle)
fortran-stdlib 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,008 kB
  • sloc: f90: 24,178; ansic: 1,244; cpp: 623; python: 119; makefile: 13
file content (17 lines) | stat: -rw-r--r-- 433 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! Illustrate the usage of `remove_directory`
program example_remove_directory
    use stdlib_system, only: remove_directory
    use stdlib_error, only: state_type
    implicit none

    type(state_type) :: err

    call remove_directory("directory_to_be_removed", err)

    if (err%error()) then
        print *, err%print()
    else
        print *, "directory removed successfully"
    end if

end program example_remove_directory