aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-07-15 11:52:42 +0200
committerLars Ingebrigtsen2019-07-15 11:52:42 +0200
commit4529057c97322893fb415512a2a51bc4616754f7 (patch)
tree104c09b9cb03bfe49eb7b9fd0b2bad01ba77bfa9 /doc
parentdbd1d2ebf868964fa5b2db5440ba27560846f95f (diff)
downloademacs-4529057c97322893fb415512a2a51bc4616754f7.tar.gz
emacs-4529057c97322893fb415512a2a51bc4616754f7.zip
Make directory-files-recursively take a PREDICATE parameter
* lisp/files.el (directory-files-recursively): Take an optional PREDICATE parameter (bug#28567). * doc/lispref/files.texi (Contents of Directories): Document it.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/files.texi9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 66678d33915..0519f787dce 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2911,7 +2911,7 @@ An error is signaled if @var{directory} is not the name of a directory
2911that can be read. 2911that can be read.
2912@end defun 2912@end defun
2913 2913
2914@defun directory-files-recursively directory regexp &optional include-directories 2914@defun directory-files-recursively directory regexp &optional include-directories predicate
2915Return all files under @var{directory} whose names match @var{regexp}. 2915Return all files under @var{directory} whose names match @var{regexp}.
2916This function searches the specified @var{directory} and its 2916This function searches the specified @var{directory} and its
2917sub-directories, recursively, for files whose basenames (i.e., without 2917sub-directories, recursively, for files whose basenames (i.e., without
@@ -2925,6 +2925,13 @@ alphabetically by their basenames. By default, directories whose
2925names match @var{regexp} are omitted from the list, but if the 2925names match @var{regexp} are omitted from the list, but if the
2926optional argument @var{include-directories} is non-@code{nil}, they 2926optional argument @var{include-directories} is non-@code{nil}, they
2927are included. 2927are included.
2928
2929By default, all subdirectories are descended into. If @var{predicate}
2930is @code{t}, errors when trying to descend into a subdirectory (for
2931instance, if it's not readable by this user) are ignored. If it's
2932neither @code{nil} nor @code{t}, it should be a function that takes
2933one parameter (the subdirectory name) and should return non-@code{nil}
2934if the directory is to be descended into.
2928@end defun 2935@end defun
2929 2936
2930@defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format 2937@defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format