File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -646,6 +646,51 @@ Subroutine
646646
647647---
648648
649+ ## ` exists ` - Checks if a path exists in the filesystem
650+
651+ ### Status
652+
653+ Experimental
654+
655+ ### Description
656+
657+ This function performs a system call (syscall) to the operating system, to retrieve the metadata
658+ corresponding to the path, and identifies the type of path it is.
659+ It can distinguish among the following path types
660+
661+ - Regular File
662+ - Directory
663+ - Symbolic Link
664+
665+ Returns a constant representing the path type or ` type_unknown ` if it cannot be determined.
666+ If there has been an error, It is handled using ` state_type ` .
667+
668+ ### Syntax
669+
670+ ` res = [[stdlib_system(module):exists(function)]] (path [, err]) `
671+
672+ ### Class
673+
674+ Function
675+
676+ ### Arguments
677+
678+ ` path ` : Shall be a character string containing the path. It is an ` intent(in) ` argument.
679+
680+ ` err ` (optional): Shall be of type ` state_type ` , and is used for error handling. It is an ` optional, intent(out) ` argument.
681+
682+ ### Return values
683+
684+ ` err ` is an optional state return flag. On error if not requested, an ` FS_ERROR ` will trigger an error stop.
685+
686+ ### Example
687+
688+ ``` fortran
689+ {!example/system/example_exists.f90!}
690+ ```
691+
692+ ---
693+
649694## ` null_device ` - Return the null device file path
650695
651696### Status
You can’t perform that action at this time.
0 commit comments