This actor reads tokens from any number of input channels and writes
their string values to the specified output file. The input type
can be anything. If a StringToken is received, then its stringValue()
method will be used to get the string to write to the file. Otherwise,
the toString() method of the received token will be used. If no file name
is given, then the values are written to the standard output.
If multiple input channels are provided on the input port, then
the values received are written separated by a tab character.
Each time a new name is received on the <i>filename</i> input, a
new file will be opened for writing. If no new filename is received,
then the data will be appended to previously used file. When appending,
the values received on subsequent firings are separated by a newline
character (a newline character will be inserted if one is not already
provide by the input string).
Unlike @see{ExpressionWriter}, this actor makes no changes to the
input string. It writes to the file exactly what it receives on its
input.
Yuhong Xiong, Edward A. Lee
$Id: FileWriter.java 70402 2014-10-23 00:52:20Z cxh $
Ptolemy II 0.4
Yellow (yuhong)
Yellow (mudit)
The name of the file to write to.
By default, this parameter contains an empty string, which
is interpreted to mean that output should be directed to the
standard output.
See <a href="../../../ptolemy/actor/parameters/FilePortParameter.xml">ptolemy.actor.parameters.FilePortParameter</a> for
details about relative path names.