An abstract base class which serves as a common interface to archive entry classes such as wxZipEntry. These hold the meta-data (filename, timestamp, etc.), for entries in archive files such as zips and tars.
Archive formats such as zip
Generic archive programming
This information applies only when reading archives from non-seekable streams. When the stream is seekable GetNextEntry() returns a fully populated wxArchiveEntry. See 'Archives on non-seekable streams' for more information.
For generic programming, when the worst case must be assumed, you can rely on all the fields of wxArchiveEntry being fully populated when GetNextEntry() returns, with the the following exceptions:
|GetSize()||Guaranteed to be available after the entry has been read to Eof(), or CloseEntry() has been called|
|IsReadOnly()||Guaranteed to be available after the end of the archive has been reached, i.e. after GetNextEntry() returns NULL and Eof() is true|
wxArchiveEntry* Clone(void) const
Returns a copy of this entry object.
wxDateTime GetDateTime(void) const
The entry's timestamp.
wxPathFormat GetInternalFormat(void) const
Returns the path format used internally within the archive to store filenames.
wxString GetInternalName(void) const
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.
Looking up an archive entry by name
wxString GetName(wxPathFormat format = wxPATH_NATIVE) const
The entry's name, by default in the native format. The name can include directory components, i.e. it can be a full path.
If this is a directory entry, (i.e. if IsDir() is true) then GetName() returns the name with a trailing path separator.
Similarly, setting a name with a trailing path separator sets IsDir().
off_t GetOffset(void) const
Returns a numeric value unique to the entry within the archive.
off_t GetSize(void) const
The size of the entry's data in bytes.
bool IsDir(void) const
True if this is a directory entry.
Directory entries are entries with no data, which are used to store the meta-data of directories. They also make it possible for completely empty directories to be stored.
The names of entries within an archive can be complete paths, and unarchivers typically create whatever directories are necessary as they restore files, even if the archive contains no explicit directory entries.
bool IsReadOnly(void) const
True if the entry is a read-only file.
Sets the notifier for this entry. Whenever the wxArchiveInputStream 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 archive in a pipeline (i.e. between non-seekable streams).
Archives on non-seekable streams