Class Entry¶
Defined in File entry.h
Inheritance Relationships¶
Derived Type¶
private zim::Item
(Class Item)
Class Documentation¶
-
class Entry¶
An entry in an
Archive
.All
Entry
’s methods are threadsafe.Subclassed by zim::Item
Public Functions
-
bool isRedirect() const¶
-
std::string getTitle() const¶
-
std::string getPath() const¶
-
Item getItem(bool follow = false) const¶
Get the item associated to the entry.
An item is associated only if the entry is not a redirect. For convenience, if follow is true, return the item associated to the targeted entry.
- Parameters:
follow – True if the redirection is resolved before getting the item. (false by default)
- Throws:
InvalidType – if the entry is a redirection and follow is false.
- Returns:
The Item associated to the entry.
-
Item getRedirect() const¶
Get the item associated to the target entry.
If there is a chain of redirection, the whole chain is resolved and the item associted to the last entry is returned.
- Throws:
InvalidType – if the entry is not a redirection.
- Returns:
the Item associated with the targeted entry.
-
Entry getRedirectEntry() const¶
Get the Entry targeted by the entry.
- Throws:
InvalidEntry – if the entry is not a redirection.
- Returns:
The entry directly targeted by this redirect entry.
-
entry_index_type getRedirectEntryIndex() const¶
Get the index of the Entry targeted by the entry.
- Throws:
InvalidEntry – if the entry is not a redirection.
- Returns:
The index of the entry directly targeted by this redirect entry.
-
inline entry_index_type getIndex() const¶
Protected Attributes
-
std::shared_ptr<FileImpl> m_file¶
-
entry_index_type m_idx¶
-
std::shared_ptr<const Dirent> m_dirent¶
-
bool isRedirect() const¶