1.6

Table Of Contents
Examples
openBinaryWriter()
Function that opens a file as a binary file for writing purposes.
openBinaryWriter(filename, append)
Opens filename as a binary file for writing purposes. The append Boolean parameter specifies
whether the file pointer should initially be positioned at the end of the existing file (append
mode) or at the beginning of the file (overwrite mode). The function returns a BinaryWriter
object.
filename
String that represents the name of the file to open.
append
Boolean parameter that specifies whether the file pointer should initially be positioned at the
end of the existing file (append mode) or at the beginning of the file (overwrite mode).
Examples
openTextReader()
Function that opens a file as a text file for reading purposes.
openTextReader(filename,encoding)
Opens filename as a text file for reading purposes, using the encoding specified as a string
(UTF-8, ISO-8859-1, etc.). The function returns a TextReader object.
filename
String that represents the name of the file to open.
Example
In the following example, the openTextReader function is used to open the actual data sample
file in the Data Mapper for reading:
var fileIn = openTextReader(data.filename);
var tmp = createTmpFile();
var fileOut = openTextWriter(tmp.getPath());
var line;
Page 240