Mercurial > emacs
comparison lispref/files.texi @ 52003:0509fad02151
(Truenames): Add LIMIT arg to file-chase-links.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 22 Jul 2003 15:25:53 +0000 |
parents | 3abc365e9d90 |
children | 3b706f94b559 |
comparison
equal
deleted
inserted
replaced
52002:26d4153f70a1 | 52003:0509fad02151 |
---|---|
946 @defun file-truename filename | 946 @defun file-truename filename |
947 The function @code{file-truename} returns the truename of the file | 947 The function @code{file-truename} returns the truename of the file |
948 @var{filename}. The argument must be an absolute file name. | 948 @var{filename}. The argument must be an absolute file name. |
949 @end defun | 949 @end defun |
950 | 950 |
951 @defun file-chase-links filename | 951 @defun file-chase-links filename &optional limit |
952 This function follows symbolic links, starting with @var{filename}, | 952 This function follows symbolic links, starting with @var{filename}, |
953 until it finds a file name which is not the name of a symbolic link. | 953 until it finds a file name which is not the name of a symbolic link. |
954 Then it returns that file name. | 954 Then it returns that file name. If you specify a number for |
955 @var{limit}, then after chasing through that many links, the function | |
956 just returns what it as even if that is still a symbolic link. | |
955 @end defun | 957 @end defun |
956 | 958 |
957 To illustrate the difference between @code{file-chase-links} and | 959 To illustrate the difference between @code{file-chase-links} and |
958 @code{file-truename}, suppose that @file{/usr/foo} is a symbolic link to | 960 @code{file-truename}, suppose that @file{/usr/foo} is a symbolic link to |
959 the directory @file{/home/foo}, and @file{/home/foo/hello} is an | 961 the directory @file{/home/foo}, and @file{/home/foo/hello} is an |