FUNCTION REFERENCE

mustBeFile

Validate that value refers to an existing file.

Validate that value refers to an existing file.

Syntax

mustBeFile(A)

Throws an error if A is not text or any path does not name an existing file.

Example

writelines("hi", "a.txt"); mustBeFile("a.txt")

Differences from MATLAB: None.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.