CZipFile Class Reference
class CZipFile : public CZipArchive |
A CZipFile represents a ZIP archive contained in a single file. Multi file zip archives are not supported.
Nested Classes and Structures
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) |
Constructor & Destructor Documentation
CZipFile(RFs &, const TDesC &)
IMPORT_C | CZipFile | ( | RFs & | aFs, |
| const TDesC & | aFileName |
| ) | |
~CZipFile()
IMPORT_C | ~CZipFile | ( | ) | [virtual] |
Member Functions Documentation
CaseInsensitiveMemberL(const TDesC &)
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.
-
leave
- ... Any one of the system-wide error codes for other errors.
Parameters
const TDesC & aName | The name of the file to be searched in the zipfile |
CaseSensitiveOrCaseInsensitiveMemberL(const TDesC &)
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.
-
leave
- ... Any one of the system-wide error codes for other errors.
Parameters
const TDesC & aName | The name of the file to be searched in the zipfile |
ConstructL(const TDesC &)
IMPORT_C void | ConstructL | ( | const TDesC & | aFileName | ) | [protected] |
Second phase of construction. Used by filename using NewL overload
-
leave
- ... Any one of the system-wide error codes for other errors.
ConstructL(RFile &)
IMPORT_C void | ConstructL | ( | RFile & | aFile | ) | [protected] |
Second phase of construction. Used by Rfile using NewL overload.
-
leave
- ... Any one of the system-wide error codes for other errors.
DeleteMemberPointers(void)
void | DeleteMemberPointers | ( | void | | ) | [protected] |
FindCentralDirectoryTrailer(TUint32 &)
TInt
| FindCentralDirectoryTrailer | ( | TUint32 & | offset | ) | [protected] |
FindMemberPointer(const TDesC &, TBool)
GetInputStreamL(const CZipFileMember *, RZipFileMemberReaderStream *&)
Creates and returns the input stream for a file in the archive. Only files compressed with Stored or Deflated compression methods are supported.
-
leave
- ... Any one of the system-wide error codes for other errors.
Parameters
const CZipFileMember * aMember | The compressed file in the archive |
RZipFileMemberReaderStream *& 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. |
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
- ... Any one of the system-wide error codes for other errors.
LoadMemberPointersL(void)
TInt
| LoadMemberPointersL | ( | void | | ) | [protected] |
MakeInputStreamL(TUint32, TUint32, TUint32, TUint32)
MakeMemberL(const TMemberPointer &, const TLocalHeader &)
MemberL(const TDesC &)
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.
-
leave
- ... Any one of the system-wide error codes for other errors.
Parameters
const TDesC & aName | The name of the file to be searched in the zipfile |
NewL(RFs &, RFile &)
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.
-
leave
- KZipArchiveError If file cannot be accessed(invalid handle, corrupt file header, etc.)
-
leave
- KZipFileIOError If file cannot be read
-
leave
- KCentralDirectoryTrailerNotFound If zip file header doesn't contain information about files inside the archive
-
leave
- KCentralDirectoryTrailerInvalid If the information about files inside the archive is corrupt
-
leave
- KMultiDiskArchivesNotSupported If zipfile is a multi disk archive
-
leave
- ... Any one of the system-wide error codes for other errors.
Parameters
RFs & aFs | File server session used for opening the zipfile |
RFile & aFile | File handle to be used for accessing the zipfile |
NewL(RFs &, const TDesC &)
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.
-
leave
- KZipArchiveError If file cannot be accessed(invalid handle, corrupt file header, etc.)
-
leave
- KZipFileIOError If file cannot be read
-
leave
- KCentralDirectoryTrailerNotFound If zip file header doesn't contain information about files inside the archive
-
leave
- KCentralDirectoryTrailerInvalid If the information about files inside the archive is corrupt
-
leave
- KMultiDiskArchivesNotSupported If zipfile is a multi disk archive.
-
leave
- ... Any one of the system-wide error codes for other errors.
Parameters
RFs & aFs | File server session used for opening the zipfile |
const TDesC & aFileName | Name of the zipfile |
OpenFileL(const TDesC &)
void | OpenFileL | ( | const TDesC & | aFileName | ) | [protected] |
ReadCentralDirectoryHeaderL(TCentralDirectoryHeader &, TMemberPointer &, CCnvCharacterSetConverter *, TInt)
ReadCentralDirectoryTrailer(TUint32, TCentralDirectoryTrailer &)
ReadLocalHeader(TUint32, TLocalHeader &)
Size(TInt &)
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
TInt & aSize | On return, the size of the compressed data in bytes |
Member Enumerations Documentation
Enum anonymous
ZipFile error enumeration.
Enumerators
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.
|
Member Data Documentation
ContentAccess::CData * iData
The pointer to CData object created from a zip file
const TDesC & iFileName
const TDesC & | iFileName | [private] |
TMemberPointer * iMemberPointers
The pointer to a a compressed file in a zipfile
TCentralDirectoryTrailer
iTrailer
The central directory of ZIP File Trailer
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.