fileopen

Opens a file for reading or writing.

Syntax

fileopen(path, mode)

Argument

path
The path of the file (a string).
mode
The mode (a string).

Example

Templex Expression Result
{fileopen(“/tmp/foo”, “r”)} A unique "fid" (file identification string).
Curve Math Vectors Result
N/A N/A

Comments

Differs from the Templex command open, which relates to the output stream for Templex.

The mode can be a mode identifier allowable in C. The most common are “r” for reading and “w” for writing.

The return value is a unique file identifier string which can be used in subsequent file operations until the file is closed (via fileopen).