File tree Expand file tree Collapse file tree 1 file changed +76
-0
lines changed Expand file tree Collapse file tree 1 file changed +76
-0
lines changed Original file line number Diff line number Diff line change @@ -978,3 +978,79 @@ A character string or `type(string_type)`.
978
978
``` fortran
979
979
{!example/system/example_path_dir_name.f90!}
980
980
```
981
+
982
+ ---
983
+
984
+ ## ` is_abs ` - Checks if the path is absolute
985
+
986
+ ### Status
987
+
988
+ Experimental
989
+
990
+ ### Description
991
+
992
+ This function checks if the path is absolute (i.e not relative).
993
+ - On POSIX systems this means the path starts with ` / ` .
994
+ - On Windows systems this means the path is either an UNC path (like ` \\host\path\share ` ) or
995
+ a path starting with a drive letter (like ` C:\Users\ ` )
996
+
997
+ ### Syntax
998
+
999
+ ` res = ` [[ stdlib_system(module): is_abs (interface)]] ` (p) `
1000
+
1001
+ ### Class
1002
+
1003
+ Function
1004
+
1005
+ ### Arguments
1006
+
1007
+ ` p ` : the path, a character string or ` type(string_type) ` . It is an ` intent(in) ` argument.
1008
+
1009
+
1010
+ ### Return values
1011
+
1012
+ A ` logical ` indicating if the the path is absolute.
1013
+
1014
+ ### Example
1015
+
1016
+ ``` fortran
1017
+ {!example/system/example_path_abs.f90!}
1018
+ ```
1019
+
1020
+ ---
1021
+
1022
+ ## ` abs_path ` - Returns the absolute path
1023
+
1024
+ ### Status
1025
+
1026
+ Experimental
1027
+
1028
+ ### Description
1029
+
1030
+ This function returns the absolutized version of the provided path.
1031
+
1032
+ ### Syntax
1033
+
1034
+ ` res = ` [[ stdlib_system(module): abs_path (interface)]] ` (p [, err]) `
1035
+
1036
+ ### Class
1037
+
1038
+ Function
1039
+
1040
+ ### Arguments
1041
+
1042
+ ` p ` : the path, a character string or ` type(string_type) ` . It is an ` intent(in) ` argument.
1043
+
1044
+ ` err ` (optional): Shall be of type ` state_type ` , and is used for error handling. It is an ` optional, intent(out) ` argument.
1045
+
1046
+ ### Return values
1047
+
1048
+ ` res ` : the absolutized version of the path, It is of type ` character(:), allocatable ` .
1049
+
1050
+ ` err ` : It is an optional state return flag. On error if not requested, an ` FS_ERROR ` will trigger an error stop.
1051
+
1052
+ ### Example
1053
+
1054
+ ``` fortran
1055
+ {!example/system/example_path_abs.f90!}
1056
+ ```
You can’t perform that action at this time.
0 commit comments