Barracuda Application Server C/C++ Reference
NO
|
Example code that shows you how to write a ZipReader interface for the ZipIo class.
This example code shows you how to write a ZipReader driver object. The ZipIo class uses the ZipReader driver object when reading Zip-data from a Zip-File. See class ZipIo for more information.
This example code uses the file system for reading the Zip-File. The constructor opens the Zip-File and method "diskRead", see code, uses the Posix function fseek for setting the file pointer to the requested offset position and function fread for reading the actual data.
#include <FileZipReader.h>
Public Member Functions | |
FileZipReader (const char *pathName) | |
The ZipReader constructor opens the Zip-File for reading. More... | |
~FileZipReader () | |
The destructor closes the file connection. | |
Public Member Functions inherited from CspReader | |
bool | isValid () |
Returns true if the reader object is valid. | |
FileZipReader::FileZipReader | ( | const char * | pathName | ) |
The ZipReader constructor opens the Zip-File for reading.
You must call CspReader::isValid, which informs you if the constructor successfully opened the Zip-File for reading.
pathName | is the path and name to the Zip-File. |