Function: f-entries

f-entries is a byte-compiled function defined in f.el.

Signature

(f-entries PATH &optional FN RECURSIVE)

Documentation

Find all files and directories in PATH.

FN - called for each found file and directory. If FN returns a thruthy value, file or directory will be included. RECURSIVE - Search for files and directories recursive.

Other relevant functions are documented in the f group.

Shortdoc

;; f
(f-entries "path/to/dir")
    -> [it depends]
  (f-entries "path/to/dir" #'(lambda (file) (s-matches\? "test" file)))
    -> [it depends]
  (f-entries "path/to/dir" nil t)
    -> [it depends]
  (f--entries "path/to/dir" (s-matches\? "test" it))
    -> [it depends]

Source Code

;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
(defun f-entries (path &optional fn recursive)
  "Find all files and directories in PATH.

FN - called for each found file and directory.  If FN returns a thruthy
value, file or directory will be included.
RECURSIVE - Search for files and directories recursive."
  (let ((entries (f--collect-entries path recursive)))
    (if fn (-select fn entries) entries)))