Skip to content

Commit 1c50e73

Browse files
committed
add docs
1 parent d8fedab commit 1c50e73

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

doc/specs/stdlib_system.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,80 @@ The `err` is set accordingly.
532532

533533
---
534534

535+
## `get_cwd` - Gets the current working directory
536+
537+
### Status
538+
539+
Experimental
540+
541+
### Description
542+
543+
It gets the current working directory associated with the process calling this subroutine.
544+
It is designed to work across multiple platforms. On Windows, paths with both forward `/` and backward `\` slashes are accepted.
545+
546+
### Syntax
547+
548+
`call [[stdlib_system(module):get_cwd(subroutine)]] (cwd, err)`
549+
550+
### Class
551+
552+
Subroutine
553+
554+
### Arguments
555+
556+
`cwd`: Shall be a character string containing the path of the current working directory (cwd). It is an `intent(out)` argument.
557+
558+
`err`: Shall be of type `state_type`, for error handling. It is an `intent(out)` argument.
559+
560+
### Return values
561+
562+
The `err` is set accordingly.
563+
564+
### Example
565+
566+
```fortran
567+
{!example/system/example_cwd.f90!}
568+
```
569+
570+
---
571+
572+
## `set_cwd` - Sets the current working directory
573+
574+
### Status
575+
576+
Experimental
577+
578+
### Description
579+
580+
It sets the current working directory associated with the process calling this subroutine.
581+
It is designed to work across multiple platforms. On Windows, paths with both forward `/` and backward `\` slashes are accepted.
582+
583+
### Syntax
584+
585+
`call [[stdlib_system(module):set_cwd(subroutine)]] (path, err)`
586+
587+
### Class
588+
589+
Subroutine
590+
591+
### Arguments
592+
593+
`path`: Shall be a character string containing the path of the directory. It is an `intent(in)` argument.
594+
595+
`err`: Shall be of type `state_type`, for error handling. It is an `intent(out)` argument.
596+
597+
### Return values
598+
599+
The `err` is set accordingly.
600+
601+
### Example
602+
603+
```fortran
604+
{!example/system/example_cwd.f90!}
605+
```
606+
607+
---
608+
535609
## `null_device` - Return the null device file path
536610

537611
### Status

0 commit comments

Comments
 (0)