Logo Search packages:      
Sourcecode: xulrunner version File versions  Download package

nsZipItem Struct Reference

#include <nsZipArchive.h>

List of all members.


Detailed Description

This file defines some of the basic structures used by libjar to read Zip files. It makes use of zlib in order to do the decompression.

A few notes on the classes/structs: nsZipArchive represents a single Zip file, and maintains an index of all the items in the file. nsZipItem represents a single item (file) in the Zip archive. nsZipFind represents the metadata involved in doing a search, and current state of the iteration of found objects.

There is a lot of ifdef STANDALONE here, and that is so that these basic structures can be reused in a standalone static library. In order for the code to be reused, these structures should never use anything from XPCOM, including such obvious things as NS_ASSERTION(). Instead, use the basic NSPR equivalents.

There is one key difference in the way that this code behaves in STANDALONE mode. The nsZipArchive owns a single file descriptor and that is used to read the ZIP file index, and for 'Test' and 'Extract'. Since there is only one nsZipArchive per file, you can only Test/Extract one file at a time from the Zip file. 'MT''safe' reading from the zipfile is performed through JARInputStream, which maintains its own file descriptor, allowing for multiple reads concurrently from the same zip file. nsZipItem -- a helper struct for nsZipArchive

each nsZipItem represents one file in the archive and all the information needed to manipulate it.

Definition at line 107 of file nsZipArchive.h.


Public Attributes

PRUint8 compression
PRUint32 crc32
PRUint32 dataOffset
PRUint16 date
PRPackedBool hasDataOffset: 1
PRUint32 headerOffset
PRPackedBool isDirectory: 1
PRPackedBool isSynthetic: 1
PRUint16 mode
char name [1]
nsZipItemnext
PRUint32 realsize
PRUint32 size
PRUint16 time

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index