ffap-locate-file

ffap-locate-file is a compiled Lisp function in `ffap.el'.

(ffap-locate-file FILE NOSUFFIX PATH)

A generic path-searching function.
Returns the name of file in PATH, or nil.
Optional NOSUFFIX, if nil or t, is like the fourth argument
for `load': whether to try the suffixes (".elc" ".el" "").
If a nonempty list, it is a list of suffixes to try instead.
PATH is a list of directories.

This uses `ffap-file-exists-string', which may try adding suffixes from
`ffap-compression-suffixes'.