Poco::Zip

class ZipFileInfo

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

Description

Stores a Zip directory entry of a file

Member Summary

Member Functions: createHeader, getCRC, getCompressedSize, getCompressionMethod, getDiskNumberStart, getExtraField, getFileComment, getFileName, getFileType, getHeaderSize, getHostSystem, getOffset, getRequiredVersion, getUncompressedSize, getVersionMadeBy, hasExtraField, isDirectory, isEncrypted, isFile, lastModifiedAt, needsZip64, setOffset, setZip64Data

Constructors

ZipFileInfo

ZipFileInfo(
    const ZipLocalFileHeader & header
);

Creates a ZipFileInfo from a ZipLocalFileHeader

ZipFileInfo

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

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

Destructor

~ZipFileInfo

~ZipFileInfo();

Destroys the ZipFileInfo.

Member Functions

createHeader

std::string createHeader() const;

getCRC inline

Poco::UInt32 getCRC() const;

getCompressedSize inline

Poco::UInt64 getCompressedSize() const;

getCompressionMethod inline

ZipCommon::CompressionMethod getCompressionMethod() const;

getDiskNumberStart inline

Poco::UInt16 getDiskNumberStart() const;

The number of the disk on which this file begins (multidisk archives)

getExtraField inline

const std::string & getExtraField() const;

getFileComment inline

const std::string & getFileComment() const;

getFileName inline

const std::string & getFileName() const;

getFileType inline

ZipCommon::FileType getFileType() const;

Binary or ASCII file?

getHeaderSize inline

Poco::UInt32 getHeaderSize() const;

Returns the total size of the header including filename + other additional fields

getHostSystem inline

ZipCommon::HostSystem getHostSystem() const;

getOffset inline

Poco::UInt64 getOffset() const;

Where on the disk starts the localheader. Combined with the disk number gives the exact location of the header

getRequiredVersion inline

void getRequiredVersion(
    int & major,
    int & minor
) const;

The minimum version required to extract the data

getUncompressedSize inline

Poco::UInt64 getUncompressedSize() const;

getVersionMadeBy inline

void getVersionMadeBy(
    int & major,
    int & minor
) const;

The ZIP version used to create the file

hasExtraField inline

bool hasExtraField() const;

isDirectory inline

bool isDirectory() const;

isEncrypted inline

bool isEncrypted() const;

isFile inline

bool isFile() const;

lastModifiedAt inline

const Poco::DateTime & lastModifiedAt() const;

needsZip64 inline

bool needsZip64() const;

setOffset inline

void setOffset(
    Poco::UInt64 val
);

setZip64Data inline

void setZip64Data();

Variables

HEADER static

static const char HEADER[ZipCommon::HEADER_SIZE];