Navigation

Operators and Keywords

Function List:

C++ API

: addpath (dir1, …)
: addpath (dir1, …, option)

Add named directories to the function search path.

If option is "-begin" or 0 (the default), prepend the directory name to the current path. If option is "-end" or 1, append the directory name to the current path. Directories added to the path must exist.

In addition to accepting individual directory arguments, lists of directory names separated by pathsep are also accepted. For example:

addpath ("dir1:/dir2:~/dir3")

For each directory that is added, and that was not already in the path, addpath checks for the existence of a file named PKG_ADD (note lack of .m extension) and runs it if it exists.

See also: path, rmpath, genpath, pathdef, savepath, pathsep.

Package: octave