Function: file-cache-add-directory-recursively

file-cache-add-directory-recursively is an autoloaded, interactive and byte-compiled function defined in filecache.el.gz.

Signature

(file-cache-add-directory-recursively DIR &optional REGEXP)

Documentation

Add DIR and any subdirectories to the file-cache.

This function does not use any external programs. If the optional REGEXP argument is non-nil, only files which match it will be added to the cache. Note that the REGEXP is applied to the files in each directory, not to the directory list itself.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/filecache.el.gz
;;;###autoload
(defun file-cache-add-directory-recursively  (dir &optional regexp)
  "Add DIR and any subdirectories to the file-cache.
This function does not use any external programs.
If the optional REGEXP argument is non-nil, only files which match it
will be added to the cache.  Note that the REGEXP is applied to the
files in each directory, not to the directory list itself."
  (interactive "DAdd directory: ")
  (mapcar
   (lambda (file)
     (or (file-directory-p file)
         (let (filtered)
           (dolist (regexp file-cache-filter-regexps)
             (and (string-match regexp file)
                  (setq filtered t)))
           filtered)
         (file-cache-add-file file)))
   (find-lisp-find-files dir (or regexp "^"))))