Skip to content

Commit 3debb1f

Browse files
committed
add example
1 parent f33e46a commit 3debb1f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

example/system/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ADD_EXAMPLE(get_runtime_os)
2+
ADD_EXAMPLE(is_directory)
23
ADD_EXAMPLE(os_type)
34
ADD_EXAMPLE(process_1)
45
ADD_EXAMPLE(process_2)
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
! Demonstrate usage of `is_directory`
2+
program example_is_directory
3+
use stdlib_system, only: is_directory
4+
implicit none
5+
! Test a directory path
6+
if (is_directory("/path/to/check")) then
7+
print *, "The specified path is a directory."
8+
else
9+
print *, "The specified path is not a directory."
10+
end if
11+
end program example_is_directory

0 commit comments

Comments
 (0)