These pages are auto-generated from self-documenting comments embedded in class files.

For more information on breve and steve, refer to the breve homepage.

Abstract : File

Class Description:

A File is an object used for creating textual output of your breve simulation.

File is not meant as a tool for archiving and dearchiving data--for a discussion of archiving and dearchiving objects, see the Archiving and Dearchiving section of the breve documentation.

Class methods:

Opening Files

Reading from an Open File

Writing to an Open File

Closing a File


close

Closes the file. This should be done when you're finished reading from or writing to a file.


open-for-appending with-file fileName (string)

Opens fileName for appending. If the file already exists, future writes will append text to the end of the file instead of overwriting it. If the file does not exist, it is created.

To be used with the methods write, write-line and write-data below.


open-for-reading with-file fileName (string)

Opens fileName for reading. To be used with the methods read-as-string, read-as-data and read-line below.


open-for-writing with-file fileName (string)

Opens fileName for writing. If the file already exists, it is truncated to length zero so that this method effectively overwrites files. If the file does not exist, it is created.

To be used with the methods write, write-line and write-data below.


read-as-data

Reads the entire file as binary data and returns a "data" type (not to be confused with a Data object).


read-as-string

Reads the entire file and returns it as a string.


read-line

Reads a single line of text from the file (ending with a newline). The size of the line read is limited to 10239


write text t (string)

Writes the string theText to the file.


write-line text t (string)

Like write, but appends a new line at the end of the string.


Documentation created Tue May 11 10:28:37 2004