@@ -543,12 +543,12 @@ Experimental
543543
544544### Description
545545
546- It creates an empty directory.
546+ It creates an empty directory with default permissions .
547547It is designed to work across multiple platforms. On Windows, paths with both forward ` / ` and backward ` \ ` slashes are accepted.
548548
549549### Syntax
550550
551- ` call [[stdlib_system(module):make_directory(subroutine)]] (path, mode, err) `
551+ ` call [[stdlib_system(module):make_directory(subroutine)]] (path [, err] ) `
552552
553553### Class
554554
@@ -558,13 +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- ` mode ` : Shall be a scalar integer indicating the permission bits required (Not applicable to Windows). It is an ` optional, intent(in) ` argument.
562-
563- ` err ` : 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.
564562
565563### Return values
566564
567- The ` err ` is set accordingly .
565+ ` err ` is an optional state return flag. If not requested and an error occurs, an ` FS_ERROR ` will trigger an error stop .
568566
569567### Example
570568
@@ -574,20 +572,20 @@ The `err` is set accordingly.
574572
575573---
576574
577- ## ` remove_directory ` - Removes an empty directory
575+ ## ` make_directory_all ` - Creates an empty directory with all its parent directories
578576
579577### Status
580578
581579Experimental
582580
583581### Description
584582
585- It deletes an empty directory.
586- It is designed to work across multiple platforms. On Windows, paths with both forward ` / ` and backward ` \ ` slashes are accepted .
583+ It creates an empty directory with default permissions .
584+ It also creates all the necessary parent directories in the path if they do not exist already .
587585
588586### Syntax
589587
590- ` call [[stdlib_system(module):remove_directory (subroutine)]] (path, err) `
588+ ` call [[stdlib_system(module):make_directory_all (subroutine)]] (path [, err] ) `
591589
592590### Class
593591
@@ -597,79 +595,79 @@ Subroutine
597595
598596` path ` : Shall be a character string containing the path of the directory to create. It is an ` intent(in) ` argument.
599597
600- ` err ` : Shall be of type ` state_type ` , for error handling. It is an ` 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.
601599
602600### Return values
603601
604- The ` err ` is set accordingly .
602+ ` err ` is an optional state return flag. If not requested and an error occurs, an ` FS_ERROR ` will trigger an error stop .
605603
606604### Example
607605
608606``` fortran
609- {!example/system/example_remove_directory .f90!}
607+ {!example/system/example_make_directory .f90!}
610608```
611609
612610---
613611
614- ## ` get_cwd ` - Gets the current working directory
612+ ## ` remove_directory ` - Removes an empty directory
615613
616614### Status
617615
618616Experimental
619617
620618### Description
621619
622- It gets the current working directory associated with the process calling this subroutine .
620+ It deletes an empty directory.
623621It is designed to work across multiple platforms. On Windows, paths with both forward ` / ` and backward ` \ ` slashes are accepted.
624622
625623### Syntax
626624
627- ` call [[stdlib_system(module):get_cwd (subroutine)]] (cwd , err) `
625+ ` call [[stdlib_system(module):remove_directory (subroutine)]] (path , err) `
628626
629627### Class
630628
631629Subroutine
632630
633631### Arguments
634632
635- ` cwd ` : Shall be a character string containing the path of the current working directory (cwd) . It is an ` intent(out ) ` argument.
633+ ` path ` : Shall be a character string containing the path of the directory to create . It is an ` intent(in ) ` argument.
636634
637- ` err ` : 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.
638636
639637### Return values
640638
641- The ` err ` is set accordingly .
639+ ` err ` is an optional state return flag. On error if not requested, an ` FS_ERROR ` will trigger an error stop .
642640
643641### Example
644642
645643``` fortran
646- {!example/system/example_cwd .f90!}
644+ {!example/system/example_remove_directory .f90!}
647645```
648646
649647---
650648
651- ## ` set_cwd ` - Sets the current working directory
649+ ## ` get_cwd ` - Gets the current working directory
652650
653651### Status
654652
655653Experimental
656654
657655### Description
658656
659- It sets the current working directory associated with the process calling this subroutine.
657+ It gets the current working directory associated with the process calling this subroutine.
660658It is designed to work across multiple platforms. On Windows, paths with both forward ` / ` and backward ` \ ` slashes are accepted.
661659
662660### Syntax
663661
664- ` call [[stdlib_system(module):set_cwd (subroutine)]] (path , err) `
662+ ` call [[stdlib_system(module):get_cwd (subroutine)]] (cwd , err) `
665663
666664### Class
667665
668666Subroutine
669667
670668### Arguments
671669
672- ` path ` : Shall be a character string containing the path of the directory. It is an ` intent(in ) ` argument.
670+ ` cwd ` : Shall be a character string containing the path of the current working directory (cwd) . It is an ` intent(out ) ` argument.
673671
674672` err ` : Shall be of type ` state_type ` , for error handling. It is an ` intent(out) ` argument.
675673
@@ -685,42 +683,43 @@ The `err` is set accordingly.
685683
686684---
687685
688- ## ` null_device ` - Return the null device file path
686+ ## ` set_cwd ` - Sets the current working directory
689687
690688### Status
691689
692690Experimental
693691
694692### Description
695693
696- This function returns the file path of the null device, which is a special file used to discard any data written to it.
697- It reads as an empty file. The null device's path varies by operating system:
698- - On Windows, the null device is represented as ` NUL ` .
699- - On UNIX-like systems (Linux, macOS), the null device is represented as ` /dev/null ` .
694+ It sets the current working directory associated with the process calling this subroutine.
695+ It is designed to work across multiple platforms. On Windows, paths with both forward ` / ` and backward ` \ ` slashes are accepted.
700696
701697### Syntax
702698
703- ` path = ` [[ stdlib_system(module): null_device (function )]] ` ( )`
699+ ` call [[stdlib_system(module):set_cwd(subroutine )]] (path, err )`
704700
705701### Class
706702
707- Function
703+ Subroutine
708704
709705### Arguments
710706
711- None .
707+ ` path ` : Shall be a character string containing the path of the directory. It is an ` intent(in) ` argument .
712708
713- ### Return Value
709+ ` err ` : Shall be of type ` state_type ` , for error handling. It is an ` intent(out) ` argument.
714710
715- - ** Type:** ` character(:), allocatable `
716- - Returns the null device file path as a character string, appropriate for the operating system.
711+ ### Return values
712+
713+ The ` err ` is set accordingly.
717714
718715### Example
719716
720717``` fortran
721- {!example/system/example_null_device .f90!}
718+ {!example/system/example_cwd .f90!}
722719```
723720
721+ ---
722+
724723## ` delete_file ` - Delete a file
725724
726725### Status
0 commit comments