#include <wx/archive.h>
These hold the meta-data (filename, timestamp, etc.), for entries in archive files such as zips and tars.
For generic programming, when the worst case must be assumed, you can rely on all the fields of wxArchiveEntry being fully populated when wxArchiveInputStream::GetNextEntry() returns, with the the following exceptions:
Public Member Functions | |
wxArchiveEntry * | Clone () const |
Returns a copy of this entry object. | |
virtual wxDateTime | GetDateTime () const =0 |
Gets the entry's timestamp. | |
virtual void | SetDateTime (const wxDateTime &dt)=0 |
Sets the entry's timestamp. | |
virtual wxString | GetName (wxPathFormat format=wxPATH_NATIVE) const =0 |
Returns the entry's name, by default in the native format. | |
virtual void | SetName (const wxString &name, wxPathFormat format=wxPATH_NATIVE)=0 |
Sets the entry's name. | |
virtual wxFileOffset | GetSize () const =0 |
Returns the size of the entry's data in bytes. | |
virtual void | SetSize (wxFileOffset size)=0 |
Sets the size of the entry's data in bytes. | |
virtual wxPathFormat | GetInternalFormat () const =0 |
Returns the path format used internally within the archive to store filenames. | |
virtual wxString | GetInternalName () const =0 |
Returns the entry's filename in the internal format used within the archive. | |
virtual wxFileOffset | GetOffset () const =0 |
Returns a numeric value unique to the entry within the archive. | |
virtual bool | IsDir () const =0 |
Returns true if this is a directory entry. | |
virtual void | SetIsDir (bool isDir=true)=0 |
Marks this entry as a directory if isDir is true. | |
virtual bool | IsReadOnly () const =0 |
Returns true if the entry is a read-only file. | |
virtual void | SetIsReadOnly (bool isReadOnly=true)=0 |
Sets this entry as a read-only file. | |
void | SetNotifier (wxArchiveNotifier ¬ifier) |
Sets the notifier (see wxArchiveNotifier) for this entry. | |
virtual void | UnsetNotifier () |
Unsets the notifier eventually attached to this entry. |
wxArchiveEntry* wxArchiveEntry::Clone | ( | ) | const |
virtual wxDateTime wxArchiveEntry::GetDateTime | ( | ) | const [pure virtual] |
Gets the entry's timestamp.
virtual wxPathFormat wxArchiveEntry::GetInternalFormat | ( | ) | const [pure virtual] |
Returns the path format used internally within the archive to store filenames.
virtual wxString wxArchiveEntry::GetInternalName | ( | ) | const [pure virtual] |
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.
Implemented in wxTarEntry, and wxZipEntry.
virtual wxString wxArchiveEntry::GetName | ( | wxPathFormat | format = wxPATH_NATIVE |
) | const [pure virtual] |
Returns 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 the returned string is the name with a trailing path separator.
virtual wxFileOffset wxArchiveEntry::GetOffset | ( | ) | const [pure virtual] |
Returns a numeric value unique to the entry within the archive.
virtual wxFileOffset wxArchiveEntry::GetSize | ( | ) | const [pure virtual] |
virtual bool wxArchiveEntry::IsDir | ( | ) | const [pure virtual] |
Returns 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.
virtual bool wxArchiveEntry::IsReadOnly | ( | ) | const [pure virtual] |
Returns true if the entry is a read-only file.
virtual void wxArchiveEntry::SetDateTime | ( | const wxDateTime & | dt | ) | [pure virtual] |
Sets the entry's timestamp.
virtual void wxArchiveEntry::SetIsDir | ( | bool | isDir = true |
) | [pure virtual] |
Marks this entry as a directory if isDir is true.
See IsDir() for more info.
virtual void wxArchiveEntry::SetIsReadOnly | ( | bool | isReadOnly = true |
) | [pure virtual] |
Sets this entry as a read-only file.
virtual void wxArchiveEntry::SetName | ( | const wxString & | name, | |
wxPathFormat | format = wxPATH_NATIVE | |||
) | [pure virtual] |
void wxArchiveEntry::SetNotifier | ( | wxArchiveNotifier & | notifier | ) |
Sets the notifier (see wxArchiveNotifier) for this entry.
Whenever the wxArchiveInputStream updates this entry, it will then invoke the associated notifier's wxArchiveNotifier::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).
virtual void wxArchiveEntry::SetSize | ( | wxFileOffset | size | ) | [pure virtual] |
virtual void wxArchiveEntry::UnsetNotifier | ( | ) | [virtual] |
![]() |
[ top ] |