Function: file-cache-add-directory-using-find

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

Signature

(file-cache-add-directory-using-find DIRECTORY)

Documentation

Use the find command to add files to the file cache.

Find is run in DIRECTORY.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/filecache.el.gz
;;;###autoload
(defun file-cache-add-directory-using-find (directory)
  "Use the `find' command to add files to the file cache.
Find is run in DIRECTORY."
  (interactive "DAdd files under directory: ")
  (let ((dir (expand-file-name directory)))
    (when (memq system-type '(windows-nt cygwin))
      (if (eq file-cache-find-command-posix-flag 'not-defined)
	  (setq file-cache-find-command-posix-flag
		(executable-command-find-posix-p file-cache-find-command))))
    (with-temp-buffer
      (call-process file-cache-find-command nil t nil
		    dir "-name"
		    (if (memq system-type '(windows-nt cygwin))
                        (if file-cache-find-command-posix-flag
			    "\\*"
			  "'*'")
		      "*")
		    "-print")
      (file-cache--add-from-buffer))))