diff options
| -rw-r--r-- | doc/lispref/files.texi | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 130282c582d..32297e98758 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -2923,8 +2923,8 @@ An error is signaled if @var{directory} is not the name of a directory | |||
| 2923 | that can be read. | 2923 | that can be read. |
| 2924 | @end defun | 2924 | @end defun |
| 2925 | 2925 | ||
| 2926 | @cindex recursive traverse of directory tree | ||
| 2926 | @defun directory-files-recursively directory regexp &optional include-directories predicate follow-symlinks | 2927 | @defun directory-files-recursively directory regexp &optional include-directories predicate follow-symlinks |
| 2927 | @cindex recursing downwards in directories | ||
| 2928 | Return all files under @var{directory} whose names match @var{regexp}. | 2928 | Return all files under @var{directory} whose names match @var{regexp}. |
| 2929 | This function searches the specified @var{directory} and its | 2929 | This function searches the specified @var{directory} and its |
| 2930 | sub-directories, recursively, for files whose basenames (i.e., without | 2930 | sub-directories, recursively, for files whose basenames (i.e., without |
| @@ -2950,17 +2950,23 @@ Symbolic links to subdirectories are not followed by default, but if | |||
| 2950 | @var{follow-symlinks} is non-@code{nil}, they are followed. | 2950 | @var{follow-symlinks} is non-@code{nil}, they are followed. |
| 2951 | @end defun | 2951 | @end defun |
| 2952 | 2952 | ||
| 2953 | |||
| 2953 | @defun locate-dominating-file file name | 2954 | @defun locate-dominating-file file name |
| 2954 | @cindex recursing upwards in directories | 2955 | Starting at @var{file}, go up the directory tree hierarchy looking for |
| 2955 | Starting at @var{file}, recurse up the directory hierarchy looking for | 2956 | the first directory where @var{name}, a string, exists, and return that |
| 2956 | the first directory where @var{name} exists, which is then the return | 2957 | directory. If @var{file} is a file, its directory will serve as the |
| 2957 | value of this function. @var{file} can be a file or a directory. If | 2958 | starting point for the search; otherwise @var{file} should be a |
| 2958 | it's a file, its directory will serve as the starting point for | 2959 | directory from which to start. The function looks in the starting |
| 2959 | searching the hierarchy of directories. | 2960 | directory, then in its parent, then in its parent's parent, etc., |
| 2960 | 2961 | until it either finds a directory with @var{name} or reaches the root | |
| 2961 | @code{name} can be either a string or a predicate. The predicate | 2962 | directory of the filesystem without finding @var{name} -- in the |
| 2962 | takes one argument (the directory) and should return non-@code{nil} if | 2963 | latter case the function returns @code{nil}. |
| 2963 | we've found the directory we're looking for. | 2964 | |
| 2965 | The argument @code{name} can also be a predicate function. The | ||
| 2966 | predicate is called for every directory examined by the function, | ||
| 2967 | starting from @var{file} (even if @var{file} is not a directory). It | ||
| 2968 | is called with one argument (the file or directory) and should return | ||
| 2969 | non-@code{nil} if that directory is the one it is looking for. | ||
| 2964 | @end defun | 2970 | @end defun |
| 2965 | 2971 | ||
| 2966 | @defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format | 2972 | @defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format |