MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / getFileSize

Method getFileSize

Source/3rdParty/Zip/ZipUtils.cpp:199–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199std::optional<size_t> ZipFile::getFileSize(const std::string& filename) const {
200 if (!_file || filename.empty()) return std::nullopt;
201 std::string searchName = getSearchName(filename);
202 auto it = _file->fileList.find(searchName);
203 if (it == _file->fileList.end()) return std::nullopt;
204 return s_cast<size_t>(it->second.size);
205}
206
207uint8_t* ZipFile::getFileDataUnsafe(const std::string& filename, size_t* size) {
208 uint8_t* buffer = nullptr;

Callers 2

getAttrMethod · 0.80
readFileFunction · 0.80

Calls 4

getSearchNameFunction · 0.85
findMethod · 0.65
emptyMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected