Programming with the File-Box takes place in an internal editor, which resembles the OMLoop editor. Like OMLoop, File-Box can only be evaluated from outside the editor, in its container patch.
This editor has one main additional feature : the StreamFile box.
StreamFile is an indispensable element for the File-Box : it is required to read from a file, or write to a file.
| The StreamFile box represents a file pointer , that is :
|
|
A number of functions of the package are used for writing or reading files in the Text-Box.
To access these functions, go to Functions / Kernel / Files
.
The file-write function writes something (its input) in a file. | The file-read-line function reads one line in a file. | ||
The file-write-line function writes a line (that is, its input and a line break) a file. | The file-eof-p function tells if the end of file has been reached. |
| The Initdo module performs an action before the iteration starts. It is a useful tool to read or write file headers. |