#include <spInputOutputFileVirtual.hpp>
Public Member Functions | |
FileVirtual () | |
FileVirtual (const io::stringc &Filename) | |
~FileVirtual () | |
bool | open (const io::stringc &Filename, const EFilePermission Permission=FILE_READWRITE) |
void | close () |
Closes the file. | |
s32 | writeBuffer (const void *Buffer, u32 Size, u32 Count=1) |
s32 | readBuffer (void *Buffer, u32 Size, u32 Count=1) const |
void | setSeek (s32 Pos, const EFileSeekTypes PosType=FILEPOS_BEGIN) |
s32 | getSeek () const |
bool | isEOF () const |
Returns true if the file read position is at the End-Of-File. | |
u32 | getSize () const |
Returns the file's size (in bytes). | |
void * | getHandle () |
bool | opened () const |
Returns true if the file is currently opened. | |
const dim::UniversalBuffer & | getBuffer () const |
dim::UniversalBuffer & | getBuffer () |
sp::io::FileVirtual::FileVirtual | ( | ) |
sp::io::FileVirtual::FileVirtual | ( | const io::stringc & | Filename | ) |
sp::io::FileVirtual::~FileVirtual | ( | ) |
void sp::io::FileVirtual::close | ( | ) | [virtual] |
Closes the file.
Implements sp::io::File.
const dim::UniversalBuffer& sp::io::FileVirtual::getBuffer | ( | ) | const [inline] |
dim::UniversalBuffer& sp::io::FileVirtual::getBuffer | ( | ) | [inline] |
void * sp::io::FileVirtual::getHandle | ( | ) | [virtual] |
Returns the file's handle. For FilePhysical objects this is a std::fstream* (C++ file stream), for FileVirtual objects it is the char* to the buffer (or rather array), for FileAsset objects it is an AAsset* (only for Android).
Implements sp::io::File.
s32 sp::io::FileVirtual::getSeek | ( | ) | const [virtual] |
Implements sp::io::File.
u32 sp::io::FileVirtual::getSize | ( | ) | const [virtual] |
Returns the file's size (in bytes).
Implements sp::io::File.
bool sp::io::FileVirtual::isEOF | ( | ) | const [virtual] |
Returns true if the file read position is at the End-Of-File.
Implements sp::io::File.
bool sp::io::FileVirtual::open | ( | const io::stringc & | Filename, | |
const EFilePermission | Permission = FILE_READWRITE | |||
) | [virtual] |
Opens the specified file. This function guarantees that the previous opened file will always closed before open the new one.
Filename,: | Specifies the file's name. This can be a relativ or absulte filename. | |
Permission,: | Specifies the file access permission. |
Implements sp::io::File.
bool sp::io::FileVirtual::opened | ( | ) | const [virtual] |
Returns true if the file is currently opened.
Implements sp::io::File.
Implements sp::io::File.
void sp::io::FileVirtual::setSeek | ( | s32 | Pos, | |
const EFileSeekTypes | PosType = FILEPOS_BEGIN | |||
) | [virtual] |
Implements sp::io::File.
Implements sp::io::File.