Skip to content

Commit 81339e7

Browse files
committed
add example
1 parent f6829c8 commit 81339e7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

example/system/example_make_directory.f90

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
! Illustrate the usage of `make_directory`
1+
! Illustrate the usage of `make_directory`, `make_directory_all`
22
program example_make_directory
3-
use stdlib_system, only: make_directory
3+
use stdlib_system, only: make_directory, make_directory_all
44
use stdlib_error, only: state_type
55
implicit none
66

@@ -14,4 +14,12 @@ program example_make_directory
1414
print *, "directory created sucessfully"
1515
end if
1616

17+
call make_directory_all("d1/d2/d3/d4", err)
18+
19+
if (err%error()) then
20+
print *, err%print()
21+
else
22+
print *, "nested directories created sucessfully"
23+
end if
24+
1725
end program example_make_directory

0 commit comments

Comments
 (0)