mustBeFile

Checks that input path refers to file.

Syntax

  • mustBeFile(var)

  • mustBeFile(var, argPosition)

  • C++: void mustBeFile(const ArrayOfVector& args, int argPosition)

Input argument

  • var - a variable: a scalar string array or row vector characters array.

  • argPosition - a positive integer value: Position of input argument.

Description

mustBeFile checks that input path refers to file or raise an error.

Example

mustBeFile(tempdir())
 mustBeFile([nelsonroot(), '/etc/startup.m'])

See also

isfile.

History

Version
Description

1.0.0

initial version

Author

Allan CORNET

Last updated