Function: cedet-files-list-recursively

cedet-files-list-recursively is a byte-compiled function defined in cedet-files.el.gz.

Signature

(cedet-files-list-recursively DIR RE)

Documentation

Return list of files in directory matching to given regex.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/cedet-files.el.gz
(defun cedet-files-list-recursively (dir re)
  "Return list of files in directory matching to given regex."
  (when (file-accessible-directory-p dir)
    (let ((files (directory-files dir t))
          matched)
      (dolist (file files matched)
        (let ((fname (file-name-nondirectory file)))
          (cond
           ((or (string= fname ".")
                (string= fname "..")) nil)
           ((and (file-regular-p file)
                 (string-match re fname))
            (setq matched (cons file matched)))
           ((file-directory-p file)
            (let ((tfiles (cedet-files-list-recursively file re)))
              (when tfiles (setq matched (append matched tfiles)))))))))))