mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 13:30:26 +02:00
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>
This commit is contained in:
parent
52809cc630
commit
5fbf5c10fc
1 changed files with 15 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue