aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-07-03 12:34:39 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-07-07 21:19:51 +0200
commit8f0b7521f7649d2fd5b92f7cfe311d2b325563a7 (patch)
treeb0356bc34fa1cb86b1f65655d8818dd588888738
parentJS user addition for parsing Microsoft Teams links. (diff)
downloadcalp-8f0b7521f7649d2fd5b92f7cfe311d2b325563a7.tar.gz
calp-8f0b7521f7649d2fd5b92f7cfe311d2b325563a7.tar.xz
Add path-absolute?
-rw-r--r--doc/ref/guile/util-path.texi5
-rw-r--r--module/hnh/util/path.scm3
2 files changed, 7 insertions, 1 deletions
diff --git a/doc/ref/guile/util-path.texi b/doc/ref/guile/util-path.texi
index 322c50ec..2a53ba91 100644
--- a/doc/ref/guile/util-path.texi
+++ b/doc/ref/guile/util-path.texi
@@ -3,7 +3,10 @@
Provided by the module @code{(hnh util path)}.
-See also @code{absolute-file-name?} from Guile.
+
+@defun path-absolute? string
+Alias of @code{absolute-file-name?} from Guile.
+@end defun
@defun path-append strings ...
Joins all strings into a path, squeezing duplicated delimiters, but
diff --git a/module/hnh/util/path.scm b/module/hnh/util/path.scm
index ea081e85..0c8af48a 100644
--- a/module/hnh/util/path.scm
+++ b/module/hnh/util/path.scm
@@ -3,6 +3,7 @@
:use-module (srfi srfi-71)
:use-module (hnh util)
:export (path-append
+ path-absolute?
path-join
path-split
file-hidden?
@@ -12,6 +13,8 @@
(define // file-name-separator-string)
(define /? file-name-separator?)
+(define path-absolute? absolute-file-name?)
+
(define (path-append . strings)
(fold (lambda (s done)
(string-append