GClasses
|
This turns a file or a folder (and its contents recursively) into a stream of bytes. More...
#include <GDirList.h>
Public Member Functions | |
GFolderSerializer (const char *szPath, bool compress) | |
szPath can be a filename or a foldername | |
~GFolderSerializer () | |
char * | next (size_t *pOutSize) |
Returns a pointer to the next chunk of bytes. Returns NULL if it is done. | |
size_t | bytesOut () |
Returns the number of bytes that have been sent out so far. | |
Protected Member Functions | |
char * | nextPiece (size_t *pOutSize) |
void | addName (const char *szName) |
void | startFile (const char *szFilename) |
void | continueFile () |
void | startDir (const char *szDirName) |
void | continueDir () |
Protected Attributes | |
const char * | m_szPath |
char * | m_szOrigPath |
char * | m_pBuf |
char * | m_pPos |
size_t | m_size |
size_t | m_state |
size_t | m_remaining |
std::ifstream * | m_pInStream |
std::stack< GDirList * > | m_dirStack |
unsigned char * | m_pCompressedBuf |
char * | m_pUncompressedBuf |
size_t | m_uncompressedPos |
unsigned int | m_compressedSize |
bool | m_compressedBufReady |
size_t | m_bytesOut |
This turns a file or a folder (and its contents recursively) into a stream of bytes.
GClasses::GFolderSerializer::GFolderSerializer | ( | const char * | szPath, |
bool | compress | ||
) |
szPath can be a filename or a foldername
GClasses::GFolderSerializer::~GFolderSerializer | ( | ) |
void GClasses::GFolderSerializer::addName | ( | const char * | szName | ) | [protected] |
size_t GClasses::GFolderSerializer::bytesOut | ( | ) | [inline] |
Returns the number of bytes that have been sent out so far.
void GClasses::GFolderSerializer::continueDir | ( | ) | [protected] |
void GClasses::GFolderSerializer::continueFile | ( | ) | [protected] |
char* GClasses::GFolderSerializer::next | ( | size_t * | pOutSize | ) |
Returns a pointer to the next chunk of bytes. Returns NULL if it is done.
char* GClasses::GFolderSerializer::nextPiece | ( | size_t * | pOutSize | ) | [protected] |
void GClasses::GFolderSerializer::startDir | ( | const char * | szDirName | ) | [protected] |
void GClasses::GFolderSerializer::startFile | ( | const char * | szFilename | ) | [protected] |
size_t GClasses::GFolderSerializer::m_bytesOut [protected] |
bool GClasses::GFolderSerializer::m_compressedBufReady [protected] |
unsigned int GClasses::GFolderSerializer::m_compressedSize [protected] |
std::stack<GDirList*> GClasses::GFolderSerializer::m_dirStack [protected] |
char* GClasses::GFolderSerializer::m_pBuf [protected] |
unsigned char* GClasses::GFolderSerializer::m_pCompressedBuf [protected] |
std::ifstream* GClasses::GFolderSerializer::m_pInStream [protected] |
char* GClasses::GFolderSerializer::m_pPos [protected] |
char* GClasses::GFolderSerializer::m_pUncompressedBuf [protected] |
size_t GClasses::GFolderSerializer::m_remaining [protected] |
size_t GClasses::GFolderSerializer::m_size [protected] |
size_t GClasses::GFolderSerializer::m_state [protected] |
char* GClasses::GFolderSerializer::m_szOrigPath [protected] |
const char* GClasses::GFolderSerializer::m_szPath [protected] |
size_t GClasses::GFolderSerializer::m_uncompressedPos [protected] |