Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e16f192

Browse files
committed
minor comments + doc changes
1 parent ab27ae0 commit e16f192

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

‎doc/specs/stdlib_system.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,11 @@ Subroutine
558558

559559
`path`: Shall be a character string containing the path of the directory to create. It is an `intent(in)` argument.
560560

561-
`err`(optional): Shall be of type `state_type`, for error handling. It is an `optional, intent(out)` argument.
561+
`err`(optional): Shall be of type `state_type`, and is used for error handling. It is an `optional, intent(out)` argument.
562562

563563
### Return values
564564

565-
`err` is an optional state return flag. On error if not requested, a `FS_ERROR` will trigger an error stop.
565+
`err` is an optional state return flag. If not requested and an error occurs, a `FS_ERROR` will trigger an error stop.
566566

567567
### Example
568568

@@ -581,7 +581,7 @@ Experimental
581581
### Description
582582

583583
It creates an empty directory with default permissions.
584-
It also creates all the parent directories required in doing so.
584+
It also creates all the necessary parent directories in the path if they do not exist already.
585585

586586
### Syntax
587587

@@ -595,11 +595,11 @@ Subroutine
595595

596596
`path`: Shall be a character string containing the path of the directory to create. It is an `intent(in)` argument.
597597

598-
`err`(optional): Shall be of type `state_type`, for error handling. It is an `optional, intent(out)` argument.
598+
`err`(optional): Shall be of type `state_type`, and is used for error handling. It is an `optional, intent(out)` argument.
599599

600600
### Return values
601601

602-
`err` is an optional state return flag. On error if not requested, a `FS_ERROR` will trigger an error stop.
602+
`err` is an optional state return flag. If not requested and an error occurs, a `FS_ERROR` will trigger an error stop.
603603

604604
### Example
605605

@@ -632,7 +632,7 @@ Subroutine
632632

633633
`path`: Shall be a character string containing the path of the directory to create. It is an `intent(in)` argument.
634634

635-
`err`(optional): Shall be of type `state_type`, for error handling. It is an `intent(out)` argument.
635+
`err`(optional): Shall be of type `state_type`, and is used for error handling. It is an `optional, intent(out)` argument.
636636

637637
### Return values
638638

‎src/stdlib_system.F90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ module stdlib_system
120120
!!
121121
!! ### Description
122122
!! This function makes an empty directory according to the path provided.
123-
!! Relative paths as well as on Windows, paths involving either `/` or `\` are accepted.
124-
!! Appropriate error message is returned whenever any error occurs.
123+
!! Relative paths are supported. On Windows, paths involving either `/` or `\` are accepted.
124+
!! An appropriate error message is returned whenever any error occurs.
125125
!!
126126
public :: make_directory
127127

@@ -135,9 +135,9 @@ module stdlib_system
135135
!!
136136
!! ### Description
137137
!! This function makes an empty directory according to the path provided.
138-
!! It also creates all the parent directories required in doing so.
139-
!! Relative paths as well as on Windows, paths involving either `/` or `\` are accepted.
140-
!! Appropriate error message is returned whenever any error occurs.
138+
!! It also creates all the necessary parent directories in the path if they do not exist already.
139+
!! Relative paths are supported.
140+
!! An appropriate error message is returned whenever any error occurs.
141141
!!
142142
public :: make_directory_all
143143

@@ -151,8 +151,8 @@ module stdlib_system
151151
!!
152152
!! ### Description
153153
!! This function Removes an empty directory according to the path provided.
154-
!! Relative paths as well as on Windows paths involving either `/` or `\` are accepted.
155-
!! Appropriate error message is returned whenever any error occurs.
154+
!! Relative paths are supported. On Windows paths involving either `/` or `\` are accepted.
155+
!! An appropriate error message is returned whenever any error occurs.
156156
!!
157157
public :: remove_directory
158158

@@ -1000,7 +1000,7 @@ subroutine make_directory_all(path, err)
10001000
end do
10011001
end subroutine make_directory_all
10021002

1003-
!! Removes an empty directory
1003+
!! removes an empty directory
10041004
subroutine remove_directory(path, err)
10051005
character(len=*), intent(in) :: path
10061006
type(state_type), optional, intent(out) :: err

‎test/system/test_filesystem.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ subroutine test_make_directory(error)
187187
call check(error, err%ok(), 'Could not make directory: '//err%print())
188188
if (allocated(error)) return
189189

190-
! Clean up: remove the empty directory
190+
! clean up: remove the empty directory
191191
call execute_command_line('rmdir ' // dir_name, exitstat=ios, cmdstat=iocmd, cmdmsg=msg)
192192
call check(error, ios==0 .and. iocmd==0, 'Cannot cleanup make_directory test: '//trim(msg))
193193
end subroutine test_make_directory
@@ -208,7 +208,7 @@ subroutine test_make_directory_existing(error)
208208
call make_directory(dir_name, err=err)
209209
call check(error, err%error(), 'Made an already existing directory somehow')
210210

211-
! Clean up: remove the empty directory
211+
! clean up: remove the empty directory
212212
call execute_command_line('rmdir ' // dir_name, exitstat=ios, cmdstat=iocmd, cmdmsg=msg)
213213

214214
if (allocated(error)) then
@@ -237,7 +237,7 @@ subroutine test_make_directory_all(error)
237237
call check(error, err%ok(), 'Could not make all directories: '//err%print())
238238
if (allocated(error)) return
239239

240-
! Clean up: remove the empty directory
240+
! clean up: remove the empty directory
241241
if (is_windows()) then
242242
call execute_command_line('rmdir /s /q ' // dir_name, exitstat=ios, cmdstat=iocmd, cmdmsg=msg)
243243
else
@@ -264,7 +264,7 @@ subroutine test_remove_directory(error)
264264
call check(error, err%ok(), 'Could not remove directory: '//err%print())
265265

266266
if (allocated(error)) then
267-
! Clean up: remove the empty directory
267+
! clean up: remove the empty directory
268268
call execute_command_line('rmdir ' // dir_name, exitstat=ios, cmdstat=iocmd, cmdmsg=msg)
269269
call check(error, ios==0 .and. iocmd==0, error%message // ' and cannot cleanup make_directory test: '//trim(msg))
270270
end if

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /