11! SPDX-Identifier: MIT
22
33!> Interaction with the filesystem.
4- module stdlib_io_filesystem
4+ module stdlib_filesystem
55 use stdlib_string_type, only: string_type
66 implicit none
77 private
88
99 public :: temp_dir, is_windows, exists, path_separator, list_dir, mkdir, rmdir, run
1010
1111#: if OS == 'Windows'
12+ !> Whether the operating system is Windows.
1213 logical, parameter :: is_windows = .true.
14+ !> Path separator for Windows.
1315 character, parameter :: path_separator = '\'
1416#: else
17+ !> Whether the operating system is Windows.
1518 logical, parameter :: is_windows = .false.
19+ !> Path separator for filesystems on non-Windows operating systems.
1620 character, parameter :: path_separator = '/'
1721#: endif
1822
@@ -22,7 +26,7 @@ contains
2226 !> Version: experimental
2327 !>
2428 !> Whether a file or directory exists at the given path.
25- !> [Specification](../page/specs/stdlib_io .html#exists)
29+ !> [Specification](../page/specs/stdlib_filesystem .html#exists)
2630 logical function exists(path)
2731 !> Path to a file or directory.
2832 character(len=*), intent(in) :: path
@@ -37,7 +41,7 @@ contains
3741 !> Version: experimental
3842 !>
3943 !> List files and directories of a directory. Does not list hidden files.
40- !> [Specification](../page/specs/stdlib_io .html#list_dir)
44+ !> [Specification](../page/specs/stdlib_filesystem .html#list_dir)
4145 subroutine list_dir(dir, files, iostat, iomsg)
4246 !> Directory to list.
4347 character(len=*), intent(in) :: dir
@@ -95,7 +99,7 @@ contains
9599 !> Version: experimental
96100 !>
97101 !> Create a directory.
98- !> [Specification](../page/specs/stdlib_io .html#mkdir)
102+ !> [Specification](../page/specs/stdlib_filesystem .html#mkdir)
99103 subroutine mkdir(dir, iostat, iomsg)
100104 character(len=*), intent(in) :: dir
101105 integer, optional, intent(out) :: iostat
@@ -111,7 +115,7 @@ contains
111115 !> Version: experimental
112116 !>
113117 !> Remove a directory including its contents.
114- !> [Specification](../page/specs/stdlib_io .html#rmdir)
118+ !> [Specification](../page/specs/stdlib_filesystem .html#rmdir)
115119 subroutine rmdir(dir)
116120 character(len=*), intent(in) :: dir
117121
@@ -125,7 +129,7 @@ contains
125129 !> Version: experimental
126130 !>
127131 !> Run a command in the shell.
128- !> [Specification](../page/specs/stdlib_io .html#run)
132+ !> [Specification](../page/specs/stdlib_filesystem .html#run)
129133 subroutine run(command, iostat, iomsg)
130134 !> Command to run.
131135 character(len=*), intent(in) :: command
0 commit comments