Skip to content

Commit f33e46a

Browse files
committed
add specs
1 parent ff42248 commit f33e46a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

doc/specs/stdlib_system.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,3 +417,38 @@ Returns one of the `integer` `OS_*` parameters representing the OS type, from th
417417
```fortran
418418
{!example/system/example_os_type.f90!}
419419
```
420+
421+
## `is_directory` - Test if a path is a directory
422+
423+
### Status
424+
425+
Experimental
426+
427+
### Description
428+
429+
This function checks if a specified file system path is a directory.
430+
It is designed to work across multiple platforms. On Windows, paths with both forward `/` and backward `\` slashes are accepted.
431+
432+
### Syntax
433+
434+
`result = [[stdlib_io(module):is_directory(function)]] (path)`
435+
436+
### Class
437+
Function
438+
439+
### Arguments
440+
441+
`path`: Shall be a character string containing the file system path to evaluate. It is an `intent(in)` argument.
442+
443+
### Return values
444+
445+
The function returns a `logical` value:
446+
447+
- `.true.` if the path matches an existing directory.
448+
- `.false.` otherwise, or if the operating system is unsupported.
449+
450+
### Example
451+
452+
```fortran
453+
{!example/system/example_is_directory.f90!}
454+
```

0 commit comments

Comments
 (0)