aboutsummaryrefslogtreecommitdiff
path: root/doc/ref/guile/util-path.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ref/guile/util-path.texi')
-rw-r--r--doc/ref/guile/util-path.texi30
1 files changed, 28 insertions, 2 deletions
diff --git a/doc/ref/guile/util-path.texi b/doc/ref/guile/util-path.texi
index 322c50ec..9cf41b40 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
@@ -33,10 +36,33 @@ The first component will be @code{""} if path is absolute.
@defun filename-extension filename
-Returns the extension of the filename, or the empty string if none exists.
+Returns the extension of the filename without a leading period, or the
+empty string if none exists.
+
+@example
+(filename-extension "file.tar.gz")
+⇒ "gz"
+@end example
@end defun
@defun realpath path
Equivalent of realpath(3). Absolute file names are returned as is,
while relative filenames gets expanded to absolute filenames.
@end defun
+
+@defun relative-to base path
+Returns @var{path} as a relative path relative to @var{base}.
+
+base must be non-empty
+@example
+(relative-to "/some" "/some/path")
+;; ⇒ "path"
+
+(relative-to "/some" "/other/path/")
+;; ⇒ "../path"
+
+(relative-to "/a/b/c" "/a/b")
+;; ⇒ "/a/b"
+@end example
+
+@end defun