reftex-locate-file

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

(reftex-locate-file FILE TYPE MASTER-DIR &optional DIE)

Find FILE of type TYPE in MASTER-DIR or on the path associated with TYPE.
If the file does not have any of the valid extensions for TYPE,
try first the default extension and only then the naked file name.
When DIE is non-nil, throw an error if file not found.