Function: file_search (<filename>)
Function: file_search (<filename>, <pathlist>)
file_search searches for the file <filename> and returns the path to the file (as a string) if it can be found; otherwise
file_search (<filename>) searches in the default search directories, which are specified by the
file_search first checks if the actual name passed exists, before attempting to match it to "wildcard" file search patterns. See
file_search_maxima concerning file search patterns.
The argument <filename> can be a path and file name, or just a file name, or, if a file search directory includes a file search pattern, just the base of the file name (without an extension). For example,
file_search ("/home/wfs/special/zeta.mac"); file_search ("zeta.mac"); file_search ("zeta");
all find the same file, assuming the file exists and
/home/wfs/special/###.mac is in
file_search (<filename>, <pathlist>) searches only in the directories specified by <pathlist>, which is a list of strings. The argument <pathlist> supersedes the default search directories, so if the path list is given,
file_search searches only the ones specified, and not any of the default search directories. Even if there is only one directory in <pathlist>, it must still be given as a one-element list.
The user may modify the default search directories. See
file_search is invoked by
file_search_lisp as the search directories.
There are also some inexact matches for
?? file_search to see them.
(%o1) true (%i2)