guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 05/10: doc: Add missing canonicalize-path documentation.


From: Ludovic Courtès
Subject: [Guile-commits] 05/10: doc: Add missing canonicalize-path documentation.
Date: Wed, 17 Jun 2020 18:32:11 -0400 (EDT)

civodul pushed a commit to branch master
in repository guile.

commit 5fbf5c10fc3054d788a006f619105a8c60741319
Author: Ricardo G. Herdt <r.herdt@posteo.de>
AuthorDate: Sat May 30 22:50:16 2020 +0200

    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>
---
 doc/ref/posix.texi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi
index b2be9d7..f34c522 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]