file-tree-walk

file-tree-walk is a compiled Lisp function in `files.el'.

(file-tree-walk DIR ACTION &rest ARGS)

Walk DIR executing ACTION on each file, with ARGS as additional arguments.
For each file, the function calls ACTION as follows:

(ACTION DIRECTORY BASENAME ARGS)

Where DIRECTORY is the leading directory of the file,
BASENAME is the basename of the file,
and ARGS are as specified in the call to this function, or nil if omitted.

The ACTION is applied to each subdirectory before descending into
it, and if nil is returned at that point, the descent will be
prevented. Directory entries are sorted with string-lessp.