aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/files.texi28
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
2923that can be read. 2923that 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
2928Return all files under @var{directory} whose names match @var{regexp}. 2928Return all files under @var{directory} whose names match @var{regexp}.
2929This function searches the specified @var{directory} and its 2929This function searches the specified @var{directory} and its
2930sub-directories, recursively, for files whose basenames (i.e., without 2930sub-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 2955Starting at @var{file}, go up the directory tree hierarchy looking for
2955Starting at @var{file}, recurse up the directory hierarchy looking for 2956the first directory where @var{name}, a string, exists, and return that
2956the first directory where @var{name} exists, which is then the return 2957directory. If @var{file} is a file, its directory will serve as the
2957value of this function. @var{file} can be a file or a directory. If 2958starting point for the search; otherwise @var{file} should be a
2958it's a file, its directory will serve as the starting point for 2959directory from which to start. The function looks in the starting
2959searching the hierarchy of directories. 2960directory, then in its parent, then in its parent's parent, etc.,
2960 2961until 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 2962directory of the filesystem without finding @var{name} -- in the
2962takes one argument (the directory) and should return non-@code{nil} if 2963latter case the function returns @code{nil}.
2963we've found the directory we're looking for. 2964
2965The argument @code{name} can also be a predicate function. The
2966predicate is called for every directory examined by the function,
2967starting from @var{file} (even if @var{file} is not a directory). It
2968is called with one argument (the file or directory) and should return
2969non-@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