Public Member Functions | Static Public Member Functions

sp::io::FilePhysical Class Reference

#include <spInputOutputFilePhysical.hpp>

Inheritance diagram for sp::io::FilePhysical:
sp::io::File

List of all members.

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)

Constructor & Destructor Documentation

sp::io::FilePhysical::FilePhysical (  ) 
sp::io::FilePhysical::~FilePhysical (  ) 

Member Function Documentation

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.

Parameters:
Filename,: Specifies the file's name. This can be a relativ or absulte filename.
Permission,: Specifies the file access permission.
Returns:
True if the file could be opened successful.

Implements sp::io::File.

bool sp::io::FilePhysical::opened (  )  const [virtual]

Returns true if the file is currently opened.

Implements sp::io::File.

s32 sp::io::FilePhysical::readBuffer ( void *  Buffer,
u32  Size,
u32  Count = 1 
) const [virtual]

Implements sp::io::File.

void sp::io::FilePhysical::setSeek ( s32  Pos,
const EFileSeekTypes  PosType = FILEPOS_BEGIN 
) [virtual]

Implements sp::io::File.

s32 sp::io::FilePhysical::writeBuffer ( const void *  Buffer,
u32  Size,
u32  Count = 1 
) [virtual]

Implements sp::io::File.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines