Poco::Zip

class ZipArchiveInfo

Library: Zip
Package: Zip
Header: Poco/Zip/ZipArchiveInfo.h

Description

A ZipArchiveInfo stores central directory info

Member Summary

Member Functions: createHeader, getCentralDirectorySize, getDiskNumber, getFirstDiskForDirectoryHeader, getHeaderOffset, getNumberOfEntries, getTotalNumberOfEntries, getZipComment, setCentralDirectoryOffset, setCentralDirectorySize, setHeaderOffset, setNumberOfEntries, setTotalNumberOfEntries, setZipComment

Constructors

ZipArchiveInfo

ZipArchiveInfo();

Default constructor, everything set to zero or empty

ZipArchiveInfo

ZipArchiveInfo(
    std::istream & in,
    bool assumeHeaderRead
);

Creates the ZipArchiveInfo by parsing the input stream. If assumeHeaderRead is true we assume that the first 4 bytes were already read outside.

Destructor

~ZipArchiveInfo

~ZipArchiveInfo();

Destroys the ZipArchiveInfo.

Member Functions

createHeader

std::string createHeader() const;

Creates a header

getCentralDirectorySize inline

Poco::UInt32 getCentralDirectorySize() const;

Returns the size of the central directory in bytes

getDiskNumber inline

Poco::UInt16 getDiskNumber() const;

Get the number of the disk where this header can be found

getFirstDiskForDirectoryHeader inline

Poco::UInt16 getFirstDiskForDirectoryHeader() const;

Returns the number of the disk that contains the start of the directory header

getHeaderOffset inline

std::streamoff getHeaderOffset() const;

Returns the offset of the header in relation to the begin of this disk

getNumberOfEntries inline

Poco::UInt16 getNumberOfEntries() const;

Returns the number of entries on this disk

getTotalNumberOfEntries inline

Poco::UInt16 getTotalNumberOfEntries() const;

Returns the total number of entries on all disks

getZipComment inline

const std::string & getZipComment() const;

Returns the (optional) Zip Comment

setCentralDirectoryOffset inline

void setCentralDirectoryOffset(
    Poco::UInt32 val
);

Sets the offset of the central directory from beginning of first disk

setCentralDirectorySize inline

void setCentralDirectorySize(
    Poco::UInt32 val
);

Sets the size of the central directory in bytes

setHeaderOffset inline

void setHeaderOffset(
    std::streamoff val
);

Sets the offset of the header in relation to the begin of this disk

setNumberOfEntries inline

void setNumberOfEntries(
    Poco::UInt16 val
);

Sets the number of entries on this disk

setTotalNumberOfEntries inline

void setTotalNumberOfEntries(
    Poco::UInt16 val
);

Sets the total number of entries on all disks

setZipComment

void setZipComment(
    const std::string & comment
);

Sets the optional Zip comment.

Variables

HEADER static

static const char HEADER[ZipCommon::HEADER_SIZE];