Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

File_search

Function: file_search (<filename>)

load(draw);
 load (numericalio);
 s2 : read_matrix (file_search ("wind.data"));
 draw3d(         title = "Daily average wind speeds. Two data sets",         point_size = 2,         key        = "Sample from stations 1, 2 and 3",         points(args(submatrix (s2, 4, 5))),         point_type = 4,         key        = "Sample from stations 1, 4 and 5",         points(args(submatrix (s2, 2, 3))) );

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 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 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_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_maxima.

file_search is invoked by load with file_search_maxima and file_search_lisp as the search directories.

There are also some inexact matches for file_search. Try ?? file_search to see them.

(%o1)                                true
(%i2) 

Related Examples

file_search-load-read_list

load (descriptive);

s1 : read_list (file_...

piechart(s1, xrange=[...

Calculate

file_search-length-load-matrix-read_matrix-var

load(descriptive);

load(numericalio);

s:read_matrix(file_se...

Calculate

file_search-length-load-matrix-read_matrix-var

load(descriptive);

load(numericalio);

s:read_matrix (file_s...

Calculate

file_search-length-load-matrix-read_matrix-var

load(descriptive);

load(numericalio);

s:read_matrix (file_s...

Calculate

file_search-load-matrix-read_list-read_matrix

load (descriptive);

s1 : read_list (file...

range (s1);

Calculate

file_search-length-load-matrix-read_matrix-var

load(descriptive);

load(numericalio);

s:read_matrix (file_s...

Calculate

file_search

? file_search;

Calculate

file_search-load-makelist-random-read_list

load (descriptive);

s1 : read_list (file...

histogram (s1, nclass...

Calculate

file_search-load-makelist-random-read_list

load (descriptive);

s1 : read_list (file...

histogram (s1, nclass...

Calculate

file_search-load-numer-read_list-var

load (descriptive);

s1 : read_list (file...

var (s1), numer;

Calculate