TextFile and Outer Environment
Importing / Exporting Contents
The contents of
can be imported or exported from / to a
file on the disk.
Import and Export From a Box
To import or export a contents :
Ctrl / right click on the
choose or in the contextual menu
choose a file and directory in the dialogue window.
The imported file appears in the textfile box and in the buffer.
Import or Export from the Editor
To import contents from an external file to the open text editor, select
To export contents, select
External File Attachment
Other options allow to attach the object permanently to an
external file on the disk
From the TextFile Box
- To fill textfile
with the contents of a persistent file, Ctrl / right click on the box, select .
- To save the contents of textfile in an external file, select .
These option are alike "Import" and "Export" options, but they link the content of the object with a file on the hard drive of the computer.
With a File Pathname
To initialize a
with a file :
enter the name of a file in the "self" input of an
, outfile or tempfile box
connect the output of the box to the "self" input of the textfile box.
to the corresponding file.
Connecting a pathname to TextFile
Example : Reading a Pathname
When a box returns a pathname, this pathname can be visualized via a textfile box.
The editsco function from the OM2Csound userlibrary writes a text file – a Csound score – and returns the file pathname.Zoom
To remove a link to a file, select .
This option is only available if the
is already attached to a file. Once the attached file is is "freed", the contents of the
is internalized in the patch.
Inputting data via "exp-list" on append mode.
To modify an attached file :
input data via the "exp-list" input
evaluate the box
from the text editor, press
s to store the modifications in the box.
When the object is saved, the related file on the hard drive is modified as well.
The attached file has been deleted. The Listener displays an error message.
Contrary to the "import" and "export" options, the option implies that the textfile object itself refers to a persistent file. Hence, its content won't be stored int the patch itself.
Parallel modifications of the attached file will affect the textfile box's content.
If the attached file is deleted of moved, the textfile will be empty when the patch is reloaded.