file_output_append SciMax Toolbox file_search_maxima

SciMax Toolbox >> file_search

file_search

Maxima Function

Calling Sequence

file_search (filename)
file_search(filename,pathlist)

Description

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 returns false. file_search (filename) searches in the default search directories, which are specified by the file_search_maxima, file_search_lisp, and file_search_demo variables.

file_search first checks if the actual name passed exists, before attempting to match it to ``wildcard'' file search patterns. See 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_maxima.

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 load with file_search_maxima and file_search_lisp as the search directories.

file_output_append SciMax Toolbox file_search_maxima