632 |
|
|
633 |
(defun locate-file (filename path &optional suffixes predicate) |
(defun locate-file (filename path &optional suffixes predicate) |
634 |
"Search for FILENAME through PATH. |
"Search for FILENAME through PATH. |
635 |
|
If found, return the absolute file name of FILENAME, with its suffixes; |
636 |
|
otherwise return nil. |
637 |
|
PATH should be a list of directories to look in, like the lists in |
638 |
|
`exec-path' or `load-path'. |
639 |
If SUFFIXES is non-nil, it should be a list of suffixes to append to |
If SUFFIXES is non-nil, it should be a list of suffixes to append to |
640 |
file name when searching. If SUFFIXES is nil, it is equivalent to '(\"\"). |
file name when searching. If SUFFIXES is nil, it is equivalent to '(\"\"). |
641 |
|
Use '(\"/\") to disable PATH search, but still try the suffixes in SUFFIXES. |
642 |
If non-nil, PREDICATE is used instead of `file-readable-p'. |
If non-nil, PREDICATE is used instead of `file-readable-p'. |
643 |
PREDICATE can also be an integer to pass to the `access' system call, |
PREDICATE can also be an integer to pass to the `access' system call, |
644 |
in which case file-name handlers are ignored. This usage is deprecated. |
in which case file-name handlers are ignored. This usage is deprecated. |