MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / readItemContentsToStream

Method readItemContentsToStream

lib/Epub/Epub.cpp:771–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771bool Epub::readItemContentsToStream(const std::string& itemHref, Print& out, const size_t chunkSize) const {
772 if (itemHref.empty()) {
773 LOG_DBG("EBP", "Failed to read item, empty href");
774 return false;
775 }
776
777 const std::string path = FsHelpers::normalisePath(itemHref);
778 return ZipFile(filepath).readFileToStream(path.c_str(), out, chunkSize);
779}
780
781bool Epub::getItemSize(const std::string& itemHref, size_t* size) const {
782 const std::string path = FsHelpers::normalisePath(itemHref);

Callers 5

streamSpineFunction · 0.80
findXPathForParagraphMethod · 0.80
findXPathForProgressMethod · 0.80
createSectionFileMethod · 0.80
startElementMethod · 0.80

Calls 4

normalisePathFunction · 0.85
ZipFileClass · 0.70
emptyMethod · 0.45
readFileToStreamMethod · 0.45

Tested by

no test coverage detected