#include <IFile.h>
Public Types | |
| enum | OpenFlags { create = 0x0001, read = 0x0002, write = 0x0004, append = 0x0008 } |
Public Member Functions | |
| IFile (void) | |
| virtual | ~IFile (void) |
| virtual OpenFlags | GetOpenFlags () const =0 |
| virtual bool | SetSize (unsigned size)=0 |
| virtual bool | Open (const OpenFlags flags)=0 |
| virtual unsigned | Write (const void *buffer, unsigned bytes)=0 |
The interface to read and write data from or to files in the file system or virtual files in memory.
| xl7::io::IFile::IFile | ( | void | ) | [inline] |
Default constructor.
| virtual xl7::io::IFile::~IFile | ( | void | ) | [inline, virtual] |
Destructor.
| virtual OpenFlags xl7::io::IFile::GetOpenFlags | ( | ) | const [pure virtual] |
Returns the flags the file was opened with.
Implemented in xl7::io::File, xl7::io::PacketFile, and xl7::io::VirtualFile.
| virtual bool xl7::io::IFile::Open | ( | const OpenFlags | flags | ) | [pure virtual] |
Opens the file for reading or writing data.
Implemented in xl7::io::File, and xl7::io::PacketFile.
| virtual bool xl7::io::IFile::SetSize | ( | unsigned | size | ) | [pure virtual] |
Sets the size of the file, in bytes. Truncates or appends the difference in bytes.
Implemented in xl7::io::File, xl7::io::PacketFile, and xl7::io::VirtualFile.
| virtual unsigned xl7::io::IFile::Write | ( | const void * | buffer, | |
| unsigned | bytes | |||
| ) | [pure virtual] |
Writes data to the file and returns the number of bytes written.
Implemented in xl7::io::File, xl7::io::PacketFile, and xl7::io::VirtualFile.
1.7.1