.\" This is a wxWidgets manpage page generated from the XML docs .TH wxZipEntry 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxZipEntry \- .SH DESCRIPTION Holds the meta-data for an entry in a zip. Field availability When reading a zip from a stream that is seekable, GetNextEntry() returns a fully populated wxZipEntry object except for wxZipEntry::GetLocalExtra() . GetLocalExtra() becomes available when the entry is opened, either by calling wxZipInputStream::OpenEntry or by making an attempt to read the entry's data. For zips on non-seekable streams, the following fields are always available when GetNextEntry() returns: GetDateTime GetInternalFormat GetInternalName GetFlags GetLocalExtra GetMethod GetName GetOffset IsDir The following fields are also usually available when GetNextEntry() returns, however, if the zip was also written to a non-seekable stream the zipper is permitted to store them after the entry's data. In that case they become available when the entry's data has been read to Eof(), or CloseEntry() has been called. (GetFlags() & wxZIP_SUMS_FOLLOW) != 0 indicates that one or more of these come after the data: GetCompressedSize GetCrc GetSize The following are stored at the end of the zip, and become available when the end of the zip has been reached, i.e. after GetNextEntry() returns NULL and Eof() is true: GetComment GetExternalAttributes GetExtra GetMode GetSystemMadeBy IsReadOnly IsMadeByUnix IsText .SH "PARENTS" wxArchiveEntry .SH "INCLUDE FILES" wx/zipstrm.h .SH MEMBERS .SS wxZipEntry (const wxString& name = wxEmptyStringconst wxDateTime& dt = wxDateTime::Now()off_t size = wxInvalidOffset) Constructor. .SS wxZipEntry (const wxZipEntry& entry) Copy constructor. .SS wxZipEntry* Clone () Make a copy of this entry. .SS wxString GetComment () .SS void SetComment (const wxString& comment) A short comment for this entry. .SS off_t GetCompressedSize () The compressed size of this entry in bytes. .SS wxUint32 GetCrc () CRC32 for this entry's data. .SS wxUint32 GetExternalAttributes () .SS void SetExternalAttributes (wxUint32 attr) The low 8 bits are always the DOS/Windows file attributes for this entry. The values of these attributes are given in the enumeration wxZipAttributes . The remaining bits can store platform specific permission bits or attributes, and their meaning depends on the value of SetSystemMadeBy() . If IsMadeByUnix() is true then the high 16 bits are unix mode bits. The following other accessors access these bits: IsReadOnly/SetIsReadOnly IsDir/SetIsDir Get/SetMode .SS const char* GetExtra () .SS size_t GetExtraLen () .SS void SetExtra (const char* extrasize_t len) The extra field from the entry's central directory record. The extra field is used to store platform or application specific data. See Pkware's document 'appnote.txt' for information on its format. .SS int GetFlags () Returns a combination of the bits flags in the enumeration wxZipFlags . .SS wxString GetInternalName () Returns the entry's filename in the internal format used within the archive. The name can include directory components, i.e. it can be a full path. The names of directory entries are returned without any trailing path separator. This gives a canonical name that can be used in comparisons. .SS wxString GetInternalName (const wxString& namewxPathFormat format = wxPATH_NATIVEbool* pIsDir = NULL) A static member that translates a filename into the internal format used within the archive. If the third parameter is provided, the bool pointed to is set to indicate whether the name looks like a directory name (i.e. has a trailing path separator). .SS const char* GetLocalExtra () .SS size_t GetLocalExtraLen () .SS void SetLocalExtra (const char* extrasize_t len) The extra field from the entry's local record. The extra field is used to store platform or application specific data. See Pkware's document 'appnote.txt' for information on its format. .SS int GetMethod () .SS void SetMethod (int method) The compression method. The enumeration wxZipMethod lists the possible values. The default constructor sets this to wxZIP_METHOD_DEFAULT, which allows wxZipOutputStream to choose the method when writing the entry. .SS int GetMode () If IsMadeByUnix() is true then returns the unix permission bits stored in GetExternalAttributes() . Otherwise synthesises them from the DOS attributes. .SS void SetMode (int mode) Sets the DOS attributes in GetExternalAttributes() to be consistent with the mode given. If IsMadeByUnix() is true then also stores mode in GetExternalAttributes(). Note that the default constructor sets GetSystemMadeBy() to wxZIP_SYSTEM_MSDOS by default. So to be able to store unix permissions when creating zips, call SetSystemMadeBy(wxZIP_SYSTEM_UNIX). .SS void SetNotifier (wxZipNotifier& notifier) .SS void UnsetNotifier () Sets the notifier for this entry. Whenever the wxZipInputStream updates this entry, it will then invoke the associated notifier's OnEntryUpdated method. Setting a notifier is not usually necessary. It is used to handle certain cases when modifying an zip in a pipeline (i.e. between non-seekable streams). .SS int GetSystemMadeBy () .SS void SetSystemMadeBy (int system) The originating file-system. The default constructor sets this to wxZIP_SYSTEM_MSDOS. Set it to wxZIP_SYSTEM_UNIX in order to be able to store unix permissions using SetMode() . .SS bool IsMadeByUnix () Returns true if GetSystemMadeBy() is a flavour of unix. .SS bool IsText () .SS void SetIsText (bool isText = true) Indicates that this entry's data is text in an 8-bit encoding. .SS wxZipEntry& operator operator= (const wxZipEntry& entry) Assignment operator. .SH "SEE ALSO" wxArchiveEntry Archive formats such as zip wxZipInputStream wxZipOutputStream wxZipNotifier .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.