diff options
author | Ricardo G. Herdt <r.herdt@posteo.de> | 2020-05-30 22:50:16 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-06-18 00:30:30 +0200 |
commit | 5fbf5c10fc3054d788a006f619105a8c60741319 (patch) | |
tree | 7c790038c36ead75a920a1f2cca712aca7347039 /doc/ref | |
parent | 52809cc63031d4b83323aa9e3dcb780f02849484 (diff) | |
download | guile-5fbf5c10fc3054d788a006f619105a8c60741319.tar.gz |
doc: Add missing canonicalize-path documentation.
The documentation is copied over from libguile/filesys.c. I just added
"(absolute)" to the text to help users finding it, since this term is
more common in other languages.
* doc/ref/posix.texi (File System): Document it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'doc/ref')
-rw-r--r-- | doc/ref/posix.texi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi index b2be9d707..f34c5222d 100644 --- a/doc/ref/posix.texi +++ b/doc/ref/posix.texi @@ -1040,6 +1040,21 @@ If @var{suffix} is provided, and is equal to the end of @end lisp @end deffn +@deffn {Scheme Procedure} canonicalize-path path +@deffnx {C Function} scm_canonicalize_path (path) +Return the canonical (absolute) path of @var{path}. +A canonical path has no @code{.} or @code{..} components, +nor any repeated path separators (@code{/}) nor symlinks. + +Raises an error if any component of @var{path} does not +exist. + +@lisp +(canonicalize-path "test.xml") +@result{} "/tmp/test.xml" +@end lisp +@end deffn + @deffn {Scheme Procedure} file-exists? filename Return @code{#t} if the file named @var{filename} exists, @code{#f} if not. |