#include <CATStreamFile.h>
CATStreamFile provides a basic file stream interface. It does NOT currently support locking (non-shared) modes, and will assert or return an error if you try to use them.
File sharing is a platform dependant issue. Create a platform dependant class inherited from CATStream if you need to control it. Alternatively, implement lock files or named semaphores in this class. I don't need it yet.
Definition at line 33 of file CATStreamFile.h.
Public Member Functions | |
CATStreamFile () | |
virtual | ~CATStreamFile () |
virtual CATResult | Open (const CATWChar *pathname, OPEN_MODE mode) |
virtual CATResult | Close () |
virtual bool | IsOpen () |
virtual CATResult | Read (void *buffer, CATUInt32 &length) |
virtual CATResult | Write (const void *buffer, CATUInt32 length) |
virtual CATResult | Size (CATInt64 &filesize) |
virtual bool | IsSeekable () |
IsSeekable() returns true for files. | |
virtual CATResult | SeekRelative (CATInt32 offset) |
virtual CATResult | SeekAbsolute (CATInt64 position) |
virtual CATResult | SeekFromEnd (CATInt32 offset) |
virtual CATResult | GetPosition (CATInt64 &position) |
virtual CATString | GetName () const |
GetName() retrieves the filename of the stream. | |
virtual CATResult | ReadAbs (void *buffer, CATUInt32 &length, CATInt64 position) |
virtual CATResult | WriteAbs (const void *buffer, CATUInt32 length, CATInt64 position) |
Protected Attributes | |
CATString | fFilename |
Private Member Functions | |
CATStreamFile & | operator= (const CATStreamFile &srcStream) |
Private Attributes | |
FILE * | fFileHandle |
STDIO file handle. |