#include <zipfile.h>
Link against: ezip.lib
class CZipFile : public CZipArchive |
Public Member Enumerations | |
---|---|
enum | anonymous { KZipFileError, KZipFileNotFound, KZipFileIOError } |
Public Member Functions | |
---|---|
CZipFile(RFs &, const TDesC &) | |
virtual | ~CZipFile() |
IMPORT_C CZipFileMember * | CaseInsensitiveMemberL(const TDesC &) |
IMPORT_C CZipFileMember * | CaseSensitiveOrCaseInsensitiveMemberL(const TDesC &) |
IMPORT_C void | Close(void) |
IMPORT_C TInt | GetInputStreamL(const CZipFileMember *, RZipFileMemberReaderStream *&) |
IMPORT_C CZipFileMemberIterator * | GetMembersL(void) |
IMPORT_C CZipFileMember * | MemberL(const TDesC &) |
IMPORT_C CZipFile * | NewL(RFs &, RFile &) |
IMPORT_C CZipFile * | NewL(RFs &, const TDesC &) |
IMPORT_C TInt | OpenL(void) |
IMPORT_C TInt | Size(TInt &) |
Protected Member Functions | |
---|---|
IMPORT_C void | ConstructL(const TDesC &) |
IMPORT_C void | ConstructL(RFile &) |
void | DeleteMemberPointers(void) |
TInt | FindCentralDirectoryTrailer(TUint32 &) |
const TMemberPointer * | FindMemberPointer(const TDesC &, TBool) |
TInt | LoadMemberPointersL(void) |
RZipFileMemberReaderStream * | MakeInputStreamL(TUint32, TUint32, TUint32, TUint32) |
CZipFileMember * | MakeMemberL(TInt) |
CZipFileMember * | MakeMemberL(const TMemberPointer &, const TLocalHeader &) |
void | OpenFileL(const TDesC &) |
TInt | Read(TByte *, TUint32) |
TInt | Read(TUint16 &) |
TInt | Read(TUint32 &) |
TInt | ReadCentralDirectoryHeaderL(TCentralDirectoryHeader &, TMemberPointer &, CCnvCharacterSetConverter *, TInt) |
TInt | ReadCentralDirectoryTrailer(TUint32, TCentralDirectoryTrailer &) |
TInt | ReadLocalHeader(TUint32, TLocalHeader &) |
TInt | Seek(TInt) |
Inherited Enumerations | |
---|---|
CZipArchive:@62 | |
CZipArchive:@63 | |
CZipArchive:@64 | |
CZipArchive:@65 | |
CZipArchive:TCompressionMethod |
A CZipFile represents a ZIP archive contained in a single file. Multi file zip archives are not supported.
ZipFile error enumeration.
Enumerator | Value | Description |
---|---|---|
KZipFileError | KZipArchiveMinError - 1 |
Cannot read file directory in the archive file |
KZipFileNotFound | KZipFileError - 1 |
File not found error. It is not used in current implemenation |
KZipFileIOError | KZipFileError - 2 |
File IO error.Any error occurs during a archive file is readed. For examples, any error about reading number of disk, an offset of signature, or the content of file is non-readable. |
IMPORT_C CZipFileMember * | CaseInsensitiveMemberL | ( | const TDesC & | aName | ) |
Constructs and returns a CZipFileMember object which is used to access information about a compressed file contained in the CZipFile archive. The name of the file to be searched for in the zipfile is case-insensitive.
Parameters | |
---|---|
aName | The name of the file to be searched in the zipfile |
Leave Codes | |
---|---|
... | Any one of the system-wide error codes for other errors. |
IMPORT_C CZipFileMember * | CaseSensitiveOrCaseInsensitiveMemberL | ( | const TDesC & | aName | ) |
Constructs and returns a CZipFileMember object which is used to access information about a compressed file contained in the CZipFile archive. An exact match for the filename is searched for first. If a match is not found, a case-insensitive search is performed. If both filenames exist in the archive, the case-sensitive match will be returned.
Parameters | |
---|---|
aName | The name of the file to be searched in the zipfile |
Leave Codes | |
---|---|
... | Any one of the system-wide error codes for other errors. |
IMPORT_C void | Close | ( | void | ) |
Deprecatedin 7.0
IMPORT_C void | ConstructL | ( | const TDesC & | aFileName | ) | [protected] |
Second phase of construction. Used by filename using NewL overload
Leave Codes | |
---|---|
... | Any one of the system-wide error codes for other errors. |
IMPORT_C void | ConstructL | ( | RFile & | aFile | ) | [protected] |
Second phase of construction. Used by Rfile using NewL overload.
Leave Codes | |
---|---|
... | Any one of the system-wide error codes for other errors. |
void | DeleteMemberPointers | ( | void | ) | [protected] |
const TMemberPointer * | FindMemberPointer | ( | const TDesC & | , |
TBool | ||||
) | [protected] |
IMPORT_C TInt | GetInputStreamL | ( | const CZipFileMember * | aMember, |
RZipFileMemberReaderStream *& | aStream | |||
) |
Creates and returns the input stream for a file in the archive. Only files compressed with Stored or Deflated compression methods are supported.
Parameters | |
---|---|
aMember | The compressed file in the archive |
aStream | On return, the stream to be used for reading the contents of the compressed file. The caller owns this object and is responsible for deleting it. |
Leave Codes | |
---|---|
... | Any one of the system-wide error codes for other errors. |
IMPORT_C CZipFileMemberIterator * | GetMembersL | ( | void | ) |
Gets the iterator used for iterating through the files contained in the ZIP file. It is the caller's responsibility to release the iterator when finsihed.
Leave Codes | |
---|---|
... | Any one of the system-wide error codes for other errors. |
TInt | LoadMemberPointersL | ( | void | ) | [protected] |
RZipFileMemberReaderStream * | MakeInputStreamL | ( | TUint32 | , |
TUint32 | , | |||
TUint32 | , | |||
TUint32 | ||||
) | [protected] |
CZipFileMember * | MakeMemberL | ( | TInt | ) | [protected] |
CZipFileMember * | MakeMemberL | ( | const TMemberPointer & | , |
const TLocalHeader & | ||||
) | [protected] |
IMPORT_C CZipFileMember * | MemberL | ( | const TDesC & | aName | ) |
Constructs and returns a CZipFileMember object which is used to access information about a compressed file contained in the CZipFile archive. The name of the file to be searched for in the zipfile is case-sensitive.
Parameters | |
---|---|
aName | The name of the file to be searched in the zipfile |
Leave Codes | |
---|---|
... | Any one of the system-wide error codes for other errors. |
IMPORT_C CZipFile * | NewL | ( | RFs & | aFs, |
RFile & | aFile | |||
) | [static] |
Creates a new CZipFile object using the supplied file server session and a valid file handle. The caller must have sufficient rights to access the content of the zipfile, if encrypted/protected.
Parameters | |
---|---|
aFs | File server session used for opening the zipfile |
aFile | File handle to be used for accessing the zipfile |
Leave Codes | |
---|---|
KZipArchiveError | If file cannot be accessed(invalid handle, corrupt file header, etc.) |
KZipFileIOError | If file cannot be read |
KCentralDirectoryTrailerNotFound | If zip file header doesn't contain information about files inside the archive |
KCentralDirectoryTrailerInvalid | If the information about files inside the archive is corrupt |
KMultiDiskArchivesNotSupported | If zipfile is a multi disk archive |
... | Any one of the system-wide error codes for other errors. |
Creates a new CZipFile object using the supplied file server session and file name. The caller must have sufficient capabilities to access the directory. The caller must also have sufficient rights to access the content of the zipfile, if encrypted/protected.
Parameters | |
---|---|
aFs | File server session used for opening the zipfile |
aFileName | Name of the zipfile |
Leave Codes | |
---|---|
KZipArchiveError | If file cannot be accessed(invalid handle, corrupt file header, etc.) |
KZipFileIOError | If file cannot be read |
KCentralDirectoryTrailerNotFound | If zip file header doesn't contain information about files inside the archive |
KCentralDirectoryTrailerInvalid | If the information about files inside the archive is corrupt |
KMultiDiskArchivesNotSupported | If zipfile is a multi disk archive. |
... | Any one of the system-wide error codes for other errors. |
void | OpenFileL | ( | const TDesC & | aFileName | ) | [protected] |
TInt | ReadCentralDirectoryHeaderL | ( | TCentralDirectoryHeader & | , |
TMemberPointer & | , | |||
CCnvCharacterSetConverter * | aConverter, | |||
TInt | aConverterState | |||
) | [protected] |
TInt | ReadCentralDirectoryTrailer | ( | TUint32 | offset, |
TCentralDirectoryTrailer & | ||||
) | [protected] |
TInt | ReadLocalHeader | ( | TUint32 | , |
TLocalHeader & | ||||
) | [protected] |
Gets the size of the compressed data contained in the zip file in bytes Each CZipFile object has a compressed and uncompressed size. This method will return the compressed size of a zip file.
Parameters | |
---|---|
aSize | On return, the size of the compressed data in bytes |