Return 1 if the name exists as a variable, 2 if the name is an absolute file name, an ordinary file in Octave's
path
, or (after appending ‘.m’) a function file in Octave'spath
, 3 if the name is a ‘.oct’ or ‘.mex’ file in Octave'spath
, 5 if the name is a built-in function, 7 if the name is a directory, or 103 if the name is a function not associated with a file (entered on the command line).Otherwise, return 0.
This function also returns 2 if a regular file called name exists in Octave's search path. If you want information about other types of files, you should use some combination of the functions
file_in_path
andstat
instead.If the optional argument type is supplied, check only for symbols of the specified type. Valid types are
- ‘"var"’
- Check only for variables.
- ‘"builtin"’
- Check only for built-in functions.
- ‘"file"’
- Check only for files.
- ‘"dir"’
- Check only for directories.