![]() |
Section 8.10.3.6: |
![]() |
This class implements a model of a file which contains text in any possible character encoding and repertoire.
The following routines are required to be implemented for this class in accordance with the specifications given in the abstract class $FILES :-
This feature is the first variant of text file cursor creation, creating a cursor object which provides a facility for handling very large files of text in the given repertoire and encoding (for example to be used when a computer system has not enough memory available for the entire file contents).
cursor | ( |
size : CARD, | |
lib : LIBCHARS | |
) : TEXT_FILE_CURSOR |
Since the return value is not an optional type and has a potentially infinite range, the post-condition is vacuously true.
This routine creates and returns a file buffer cursor object associated with self for text in the given repertoire and encoding.
This feature is the second variant which creates a text file cursor object for text in the program environment repertoire and encoding which provides a facility for handling very large files of text where a computer system has not enough memory available.
cursor | ( |
size : CARD | |
) : TEXT_FILE_CURSOR |
Since the return value is not an optional type this is vacuously true.
This routine creates and returns a file buffer cursor object associated with self for text in the program environment repertoire and encoding.
This is the first of two features which are provided to send text data (of any repertoire and encoding) to a file, extending the length of the file as needed.
This feature appends the given item to the text file channel to which self is a connection.
This variant of plus sends the given item to the text file and then returns self if successful. otherwise void.
This feature appends the given item to the file channel to which self is a connection, returning self if successful, otherwise returning void.
This feature is the first of a pair which retrieve the contents of the given file into a mutable buffer which is returned.
This feature returns a buffer containing the entire contents of the text file (which could be empty) provided that it was possible to set the environment next-location-to-read point at the beginning of the file, otherwise void. The text string is in the given encoding and repertoire.
This feature retrieves the contents of the given file, considering it to be in the program environment repertoire and encoding, into a buffer which is returned.
This feature returns a buffer containing the entire contents of the text file (which could be empty) provided that it was possible to set the environment next-location-to-read point at the beginning of the file, otherwise void. The text string is in the program environment encoding and repertoire.
This feature is the first of a pair of rune text retrieval features. The entire contents of the given file is transferred to a buffer which is organised to contain a sequence of runes (see notes in the class RUNE definition) in the given repertoire and encoding. The buffer itself is returned.
This feature returns a buffer containing the entire contents of the text file (which could be empty) provided that it was possible to set the environment next-location-to-read point at the beginning of the file, otherwise void. The rune string is composed on the basis that it is in the given encoding and repertoire.
This feature retrieves the contents of the given file, considering it to be in the program environment repertoire and encoding, into a buffer which is returned.
This feature returns a buffer containing the entire contents of the text file (which could be empty) provided that it was possible to set the environment next-location-to-read point at the beginning of the file, otherwise void. The rune string is composed assuming that the data is in the program environment encoding and repertoire.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Input/Output Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Friday, 17 November 2000. |
![]() |