#include <ZipArchive.h>
Public Member Functions | |
ZipArchive (const std::string &name) | |
virtual | ~ZipArchive () |
bool | failed () |
virtual ArchiveFile * | openFile (const std::string &name) |
Returns a new object associated with the file identified by name , or 0 if the file cannot be opened. Name comparisons are case-insensitive. | |
virtual ArchiveTextFile * | openTextFile (const std::string &name) |
Returns a new object associated with the file identified by name , or 0 if the file cannot be opened. Name comparisons are case-insensitive. | |
bool | containsFile (const std::string &name) |
void | forEachFile (VisitorFunc visitor, const std::string &root) |
Performs a depth-first traversal of the archive tree starting at root . Traverses the entire tree if root is "". When a file is encountered, calls visitor.file passing the file name. When a directory is encountered, calls visitor.directory passing the directory name. Skips the directory if visitor.directory returned true. Root comparisons are case-insensitive. Names are mixed-case. | |
Private Member Functions | |
bool | read_record () |
bool | read_pkzip () |
Private Attributes | |
ZipFileSystem | m_filesystem |
std::string | m_name |
FileInputStream | m_istream |
Definition at line 30 of file ZipArchive.h.
ZipArchive::ZipArchive | ( | const std::string & | name | ) |
virtual ZipArchive::~ZipArchive | ( | ) | [virtual] |
bool ZipArchive::containsFile | ( | const std::string & | name | ) | [virtual] |
Returns true if the file identified by name
can be opened. Name comparisons are case-insensitive.
Implements Archive.
bool ZipArchive::failed | ( | ) |
void ZipArchive::forEachFile | ( | VisitorFunc | visitor, | |
const std::string & | root | |||
) | [virtual] |
Performs a depth-first traversal of the archive tree starting at root
. Traverses the entire tree if root
is "". When a file is encountered, calls visitor.file
passing the file name. When a directory is encountered, calls visitor.directory
passing the directory name. Skips the directory if visitor.directory
returned true. Root comparisons are case-insensitive. Names are mixed-case.
Implements Archive.
virtual ArchiveFile* ZipArchive::openFile | ( | const std::string & | name | ) | [virtual] |
Returns a new object associated with the file identified by name
, or 0 if the file cannot be opened. Name comparisons are case-insensitive.
Implements Archive.
virtual ArchiveTextFile* ZipArchive::openTextFile | ( | const std::string & | name | ) | [virtual] |
Returns a new object associated with the file identified by name
, or 0 if the file cannot be opened. Name comparisons are case-insensitive.
Implements Archive.
bool ZipArchive::read_pkzip | ( | ) | [private] |
bool ZipArchive::read_record | ( | ) | [private] |
ZipFileSystem ZipArchive::m_filesystem [private] |
Definition at line 32 of file ZipArchive.h.
FileInputStream ZipArchive::m_istream [private] |
Definition at line 34 of file ZipArchive.h.
std::string ZipArchive::m_name [private] |
Definition at line 33 of file ZipArchive.h.