#include <CFilesystem.h>
|
virtual void | Close ()=0 |
|
virtual bool | IsOpen ()=0 |
|
virtual size_t | Read (void *aDestBuffer, size_t aNumBytes)=0 |
|
char * | ReadAll () |
|
virtual size_t | Tell ()=0 |
|
virtual bool | Seek (long aOffset, int aWhence)=0 |
|
Platform-dependent file structures (default implementations provided in CStdioBasedFileImpl.cpp). Represents a file open for reading. Getting an instance of CInputFile does not guarantee the file has actually been opened. Check isOpen() or the result of the read functions.
◆ Close()
virtual void CloudBuilder::CInputFile::Close |
( |
| ) |
|
|
pure virtual |
Should close the file for use by other processes. If already done, should have effect.
◆ IsOpen()
virtual bool CloudBuilder::CInputFile::IsOpen |
( |
| ) |
|
|
pure virtual |
Should tell whether the file has been opened successfully.
- Returns
- true if the file is ready for read, false otherwise.
◆ Read()
virtual size_t CloudBuilder::CInputFile::Read |
( |
void * |
aDestBuffer, |
|
|
size_t |
aNumBytes |
|
) |
| |
|
pure virtual |
Reads a chunk of data from the current cursor position.
- Parameters
-
aDestBuffer | where to put the read data. |
aNumBytes | the maximum number of bytes to read. |
- Returns
- the number of bytes actually read (may be less than numBytes if the stream came to an end).
◆ ReadAll()
char* CloudBuilder::CInputFile::ReadAll |
( |
| ) |
|
Reads the whole file from the current cursor position.
- Returns
- resulting string (or null in case of error), to be freed manually!
◆ Seek()
virtual bool CloudBuilder::CInputFile::Seek |
( |
long |
aOffset, |
|
|
int |
aWhence |
|
) |
| |
|
pure virtual |
Replaces the cursor just like fseek.
- Parameters
-
aOffset | offset relative to whence. |
aWhence | one of SEEK_SET (beginning), SEEK_CUR or SEEK_END. |
◆ Tell()
virtual size_t CloudBuilder::CInputFile::Tell |
( |
| ) |
|
|
pure virtual |
Should give the absolute position of the cursor in the file.
- Returns
- the position, starting from zero.
The documentation for this class was generated from the following file:
- E:/XtraLife/GitHub/XtraLife/cloudbuilder/CloudBuilder/Headers/CFilesystem.h