Class Poco::Zip::ZipFileInfo
Author: Applied Informatics Software Engineering GmbH and Contributors
Date: 2009-11-24

# 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, getRelativeOffsetOfLocalHeader, getRequiredVersion, getUncompressedSize, getVersionMadeBy, hasExtraField, isDirectory, isEncrypted, isFile, lastModifiedAt, setOffset

## 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

Poco::UInt32 getCRC() const;

### getCompressedSize

Poco::UInt32 getCompressedSize() const;

### getCompressionMethod

ZipCommon::CompressionMethod getCompressionMethod() const;

### getDiskNumberStart

Poco::UInt16 getDiskNumberStart() const;

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

### getExtraField

const std::string & getExtraField() const;

### getFileComment

const std::string & getFileComment() const;

### getFileName

const std::string & getFileName() const;

### getFileType

ZipCommon::FileType getFileType() const;

Binary or ASCII file?

### getHeaderSize

Poco::UInt32 getHeaderSize() const;

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

### getHostSystem

ZipCommon::HostSystem getHostSystem() const;

### getRelativeOffsetOfLocalHeader

Poco::UInt32 getRelativeOffsetOfLocalHeader() const;

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

### getRequiredVersion

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

The minimum version required to extract the data

### getUncompressedSize

Poco::UInt32 getUncompressedSize() const;

### getVersionMadeBy

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

The ZIP version used to create the file

### hasExtraField

bool hasExtraField() const;

### isDirectory

bool isDirectory() const;

### isEncrypted

bool isEncrypted() const;

### isFile

bool isFile() const;

### lastModifiedAt

const Poco::DateTime & lastModifiedAt() const;

### setOffset

void setOffset(
Poco::UInt32 val
);

## Variables

### HEADER

static const char HEADER[ZipCommon::HEADER_SIZE];