diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-08-02 02:55:18 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-09-18 22:53:57 +0200 |
commit | 23cf6047ae320a1d666ddf6418bade67dfa95ada (patch) | |
tree | 1f5897d93efa3ed8de49ce4ebd199b40106f29ea /doc/ref/guile | |
parent | Extend module-imports to work on non-module scheme files. (diff) | |
download | calp-23cf6047ae320a1d666ddf6418bade67dfa95ada.tar.gz calp-23cf6047ae320a1d666ddf6418bade67dfa95ada.tar.xz |
Add procedure relative-to.
Diffstat (limited to 'doc/ref/guile')
-rw-r--r-- | doc/ref/guile/util-path.texi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/ref/guile/util-path.texi b/doc/ref/guile/util-path.texi index 2a53ba91..cf99a170 100644 --- a/doc/ref/guile/util-path.texi +++ b/doc/ref/guile/util-path.texi @@ -43,3 +43,20 @@ Returns the extension of the filename, or the empty string if none exists. 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 |