#include <VirtualFileReal.h>
Inheritance diagram for NSFileSystem::TVirtualFileReal:
Public Member Functions | |
virtual void | Close (void) |
Close file and destroy object. | |
virtual const TString & | GetName (void) const |
Returns name of this file. | |
virtual const LONG | GetSize (void) const |
Returns size of this file in bytes. | |
virtual BOOL | Eof (void) |
Determine whether file position is after last character. | |
virtual LONG | Tell (void) |
Returns actual position in file (in bytes). | |
virtual BOOL | Seek (const LONG &position) |
Seek to specified position in file. | |
virtual BOOL | SeekToStart (void) |
Seek file to begin. | |
virtual BOOL | SeekToEnd (void) |
Seek file to end. | |
virtual BOOL | SeekRelative (const LONG &offset) |
Seek file relative to actual position. | |
virtual int | GetChar (void) |
Return next character from file or EOF at end of file. | |
virtual DWORD | Read (void *buffer, const DWORD &size) |
Read specified number of bytes into buffer. | |
virtual BOOL | FindChar (int ch) |
Read file until specified character. | |
virtual BOOL | ReadUntil (int ch, TString &res) |
Read file until specified character and store it into string. | |
virtual BOOL | ReadString (TString &text) |
Read next string - "..". | |
Static Public Member Functions | |
static TVirtualFile * | OpenFile (const TString &filename) |
Return pointer to specified file or NULL when file could be opened. | |
Protected Member Functions | |
virtual | ~TVirtualFileReal (void) |
Virtual destructor. |
Thus file can be opened with classic OS routines.
You can only get pointer to opened TVirtualFile via static OpenFile method.
Definition at line 39 of file VirtualFileReal.h.
|
Virtual destructor.
Definition at line 21 of file VirtualFileReal.cpp. |
|
Close file and destroy object. After calling this method pointer to object is invalid and should be set to null. Via this method you destroy object. Implements NSFileSystem::TVirtualFile. Definition at line 93 of file VirtualFileReal.h. |
|
Determine whether file position is after last character.
Implements NSFileSystem::TVirtualFile. Definition at line 114 of file VirtualFileReal.h. |
|
Read file until specified character. If character was found then TRUE is returned and file is at position after this character.
Implements NSFileSystem::TVirtualFile. Definition at line 155 of file VirtualFileReal.h. |
|
Return next character from file or EOF at end of file.
Implements NSFileSystem::TVirtualFile. Definition at line 133 of file VirtualFileReal.h. |
|
Returns name of this file.
Implements NSFileSystem::TVirtualFile. Definition at line 100 of file VirtualFileReal.h. |
|
Returns size of this file in bytes.
Implements NSFileSystem::TVirtualFile. Definition at line 107 of file VirtualFileReal.h. |
|
Return pointer to specified file or NULL when file could be opened. Via this method you can open files from disk.
Definition at line 38 of file VirtualFileReal.cpp. References TString::c_str(). Referenced by NSFileSystem::TFSFileSystem::GetFile(). Here is the call graph for this function: ![]() |
|
Read specified number of bytes into buffer.
Implements NSFileSystem::TVirtualFile. Definition at line 143 of file VirtualFileReal.h. |
|
Read next string - "..". Method founds first character '"' and then reads string until next ". Final string doesnt contain begin and end character '"'. String parameter TEXT is always cleared. After returning TRUE position in file is set to first character after end of string (after '"'); Readed string musn't contains symbol '"' - escape characters arent recognized too.
Implements NSFileSystem::TVirtualFile. Definition at line 212 of file VirtualFileReal.h. References TString::Add(), TString::ClearDeallocOff(), and FALSE. Here is the call graph for this function: ![]() |
|
Read file until specified character and store it into string. Terminal character is not included in result string. String RES is automatically cleared in function. Return TRUE if specified character was found, FALSE otherwise (EOF was reached and terminal character was not found).
Implements NSFileSystem::TVirtualFile. Definition at line 185 of file VirtualFileReal.h. References TString::Add(), and TString::ClearDeallocOff(). Here is the call graph for this function: ![]() |
|
Seek to specified position in file. If position is outside then EOF is set. Returns TRUE if seeking was successful.
Implements NSFileSystem::TVirtualFile. Definition at line 65 of file VirtualFileReal.cpp. |
|
Seek file relative to actual position. If result is outside then is set to START or END of file. Returns TRUE if seeking was successful.
Implements NSFileSystem::TVirtualFile. Definition at line 109 of file VirtualFileReal.cpp. |
|
Seek file to end. Returns TRUE if seeking was successful. Implements NSFileSystem::TVirtualFile. Definition at line 97 of file VirtualFileReal.cpp. |
|
Seek file to begin. Returns TRUE if seeking was successful. Implements NSFileSystem::TVirtualFile. Definition at line 88 of file VirtualFileReal.cpp. |
|
Returns actual position in file (in bytes).
Implements NSFileSystem::TVirtualFile. Definition at line 121 of file VirtualFileReal.h. |