Class FileItem¶
Defined in File item.h
Inheritance Relationships¶
Base Type¶
public zim::writer::BasicItem
(Class BasicItem)
Class Documentation¶
-
class FileItem : public zim::writer::BasicItem¶
A
FileItem
is a full implemented item where the content is file.Public Functions
-
inline FileItem(const std::string &path, const std::string &mimetype, const std::string &title, Hints hints, const std::string &filepath)¶
Create a FileItem with the given path, mimetype, title and filenpath.
- Parameters:
path – the path of the item.
mimetype – the mimetype of the item.
title – the title of the item.
filepath – the path of the file in the filesystem.
-
virtual std::unique_ptr<ContentProvider> getContentProvider() const¶
The content provider of the item.
The content provider is responsible to provide the content to the creator. The returned content provider must stay valid even after creator release its reference to the item.
This method will be called once by libzim, in the main thread (but will be used in a different thread). The default IndexData will also call this method once (more) in the main thread (and use it in another thread).
- Returns:
the contentProvider of the item.
Protected Attributes
-
std::string filepath¶
-
inline FileItem(const std::string &path, const std::string &mimetype, const std::string &title, Hints hints, const std::string &filepath)¶