diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-02 02:36:22 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-02 02:36:22 +0100 |
commit | e91f7bcc41f6c2345fa55cb7f9b95dde97be1760 (patch) | |
tree | 17acd5db50ee34c4d7dfd98248a08a2363cec2dc /doc/ref/guile/util-path.texi | |
parent | Rewrote path-append to be portable. (diff) | |
download | calp-e91f7bcc41f6c2345fa55cb7f9b95dde97be1760.tar.gz calp-e91f7bcc41f6c2345fa55cb7f9b95dde97be1760.tar.xz |
Documentation of (hnh util ...)
Diffstat (limited to '')
-rw-r--r-- | doc/ref/guile/util-path.texi | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/ref/guile/util-path.texi b/doc/ref/guile/util-path.texi new file mode 100644 index 00000000..1abef3a6 --- /dev/null +++ b/doc/ref/guile/util-path.texi @@ -0,0 +1,32 @@ +@node Path Utilities +@section Path Utilities + +Provided by the module @code{(hnh util path)}. + +See also @code{absolute-file-name?} from Guile. + +@defun path-append strings ... +Joins all strings into a path, squeezing duplicated delimiters, but +ensuring that all delimiters that are needed are there. + +Note that delimiters embedded inside the string, which aren't first or +last in a substring (or are the only thing in a string) are +kept. Meaning that +@example +(path-append "/" "hello") ⇒ "/hello" +(path-append "/usr/local/bin" "cmd") ⇒ "/usr/local/bin/cmd" +@end example +@end defun + + +@defun path-join lst +@lisp +(apply path-append lst) +@end lisp +@end defun + + +@defun path-split path +Splits path into a list of components. +The first component will be @code{""} if path is absolute. +@end defun |