chickadee » pathfinder » path-find-all

path-find-all pf pathname #!optional matcher testprocedure

Like path-find, but returns a list that also includes "shadowed" matches. In other words, MATCHER gets a chance to match multiple times in multiple directories.

; The file tree:
; /usr/bin/ls
; /usr/bin/rsync
; /usr/local/bin/rsync

(define pf (make-pathfinder '("/usr/local/bin" "/usr/bin")))
(path-find-all pf "ls")
  ; => ("/usr/bin/ls")
(path-find-all pf "rsync")
  ; => ("/usr/bin/rsync "/usr/local/bin/rsync")

For another example, see pf:extensions.

Note: rather than filtering the results on file type, size etc. after calling path-find-all, consider using pathfinder tests.