LibPkg
|
An interface class to represent a zip file. More...
#include <zipfile.h>
Classes | |
class | extra_info |
A base class to represent an extra information record from a zip file. More... | |
class | file_info |
A class to represent a file information record from a zip file. More... | |
class | not_found |
An exception class for reporting not found errors. More... | |
class | riscos_info |
A class to represent a RISC OS extra information record from a zip file. More... | |
class | unsupported_compression_method |
An exception class for reporting unsupported compression method errors. More... | |
class | zlib_error |
An exception class for reporting errors in zlib. More... | |
Public Types | |
typedef unsigned short | uint16 |
A type to represent an unsigned 16-bit integer. More... | |
typedef unsigned long | uint32 |
A type to represent an unsigned 32-bit integer. More... | |
Public Member Functions | |
zipfile (const string &pathname) | |
Construct zip file object. More... | |
~zipfile () | |
Destroy zip file object. More... | |
unsigned int | size () const |
Get number of file information records. More... | |
const file_info & | operator[] (unsigned int index) const |
Get const file information record at index. More... | |
const file_info * | find (const string &pathname) const |
Find const file information record for pathname. More... | |
void | extract (const string &src_pathname, const string &dst_pathname) const |
Extract file from zip file. More... | |
An interface class to represent a zip file.
typedef unsigned short pkg::zipfile::uint16 |
A type to represent an unsigned 16-bit integer.
typedef unsigned long pkg::zipfile::uint32 |
A type to represent an unsigned 32-bit integer.
pkg::zipfile::zipfile | ( | const string & | pathname | ) |
Construct zip file object.
pathname | the pathname of the zip file. |
pkg::zipfile::~zipfile | ( | ) |
Destroy zip file object.
unsigned int pkg::zipfile::size | ( | ) | const |
Get number of file information records.
Referenced by pkg::unpack::poll().
const zipfile::file_info & pkg::zipfile::operator[] | ( | unsigned int | index | ) | const |
Get const file information record at index.
index | the index |
const zipfile::file_info * pkg::zipfile::find | ( | const string & | pathname | ) | const |
Find const file information record for pathname.
pathname | the pathname |
Referenced by extract(), and pkg::unpack::poll().
void pkg::zipfile::extract | ( | const string & | src_pathname, |
const string & | dst_pathname | ||
) | const |
Extract file from zip file.
src_pathname | the source pathname, with respect to the root of the zip file |
dst_pathname | the destination pathname |
References pkg::zipfile::file_info::csize(), find(), pkg::zipfile::file_info::method(), pkg::zipfile::file_info::offset(), pkg::soft_delete(), and UNZIP_BUFFER_SIZE.
Referenced by pkg::unpack::poll().
Reference Manual | LibPkg | Version 0.6.1 (28 Jan 2015) |