#include <File.h>
Public Member Functions | |
| File (const char *name, const char *mode) | |
| Constructor. | |
| ~File () | |
| Destructor. | |
| void | read (void *p, unsigned size) |
| The function read a number of bytes from the file to a certain memory location. | |
| void | write (const void *p, unsigned size) |
| The function writes a number of bytes from a certain memory location into the file. | |
| void | printf (const char *format,...) |
| The function implements printf for the stream represented by instances of this class. | |
| bool | exists () const |
| The function returns whether the file represented by an object of this class actually exists. | |
| bool | eof () const |
| The function returns whether the end of the file represented by an object of this class was reached. | |
Static Public Member Functions | |
| char * | getGTDir () |
| The function returns the current GT directory, e.g. | |
Private Attributes | |
| OFS::FILE * | stream |
| File handle. | |
| char | buf [65536] |
| A buffer to reduce the number of operation system calls. | |
| unsigned int | bufSize |
| The number of bytes in the buffer while reading. | |
| unsigned int | index |
| The next byte in the buffer to read/write. | |
| bool | isWrite |
| Is this a write stream? | |
Definition at line 20 of file File.h.
|
||||||||||||
|
Constructor.
Definition at line 14 of file File.cpp. References ASSERT, buf, bufSize, getGTDir(), index, isWrite, and stream. |
Here is the call graph for this function:

|
|
Destructor.
|
|
||||||||||||
|
The function read a number of bytes from the file to a certain memory location.
Definition at line 42 of file File.cpp. References ASSERT, buf, bufSize, index, isWrite, and stream. Referenced by InFile::readFromStream(). |
|
||||||||||||
|
The function writes a number of bytes from a certain memory location into the file.
Definition at line 60 of file File.cpp. References buf, index, stream, and VERIFY. Referenced by OutFile::writeToStream(). |
|
||||||||||||
|
The function implements printf for the stream represented by instances of this class.
|
|
|
The function returns whether the file represented by an object of this class actually exists.
Definition at line 72 of file File.h. References stream. Referenced by OutFile::exists(), and InFile::exists(). |
|
|
The function returns whether the end of the file represented by an object of this class was reached.
Definition at line 83 of file File.cpp. References bufSize, index, and stream. Referenced by InFile::getEof(). |
|
|
The function returns the current GT directory, e.g. /MS/OPENR/APP or <...>/GT2003 or /usr/local/GT2003
Definition at line 92 of file File.cpp. Referenced by File(). |
|
|
File handle.
Definition at line 23 of file File.h. Referenced by eof(), exists(), File(), printf(), read(), write(), and ~File(). |
|
|
A buffer to reduce the number of operation system calls.
|
|
|
The number of bytes in the buffer while reading.
|
|
|
The next byte in the buffer to read/write.
Definition at line 25 of file File.h. Referenced by eof(), File(), printf(), read(), write(), and ~File(). |
|
|
Is this a write stream?
|
1.3.6