#include <spInputOutputFilePhysical.hpp>
Public Member Functions | |
FilePhysical () | |
~FilePhysical () | |
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. | |
Static Public Member Functions | |
static bool | findFile (const io::stringc &Filename) |
sp::io::FilePhysical::FilePhysical | ( | ) |
sp::io::FilePhysical::~FilePhysical | ( | ) |
void sp::io::FilePhysical::close | ( | ) | [virtual] |
Closes the file.
Implements sp::io::File.
bool sp::io::FilePhysical::findFile | ( | const io::stringc & | Filename | ) | [static] |
void * sp::io::FilePhysical::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::FilePhysical::getSeek | ( | ) | const [virtual] |
Implements sp::io::File.
u32 sp::io::FilePhysical::getSize | ( | ) | const [virtual] |
Returns the file's size (in bytes).
Implements sp::io::File.
bool sp::io::FilePhysical::isEOF | ( | ) | const [virtual] |
Returns true if the file read position is at the End-Of-File.
Implements sp::io::File.
bool sp::io::FilePhysical::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::FilePhysical::opened | ( | ) | const [virtual] |
Returns true if the file is currently opened.
Implements sp::io::File.
Implements sp::io::File.
void sp::io::FilePhysical::setSeek | ( | s32 | Pos, | |
const EFileSeekTypes | PosType = FILEPOS_BEGIN | |||
) | [virtual] |
Implements sp::io::File.
Implements sp::io::File.