----------------------------------------------------------------
| 464 | |
| 465 | // ---------------------------------------------------------------- |
| 466 | IOStream *ZipArchiveIOSystem::Implement::OpenFile(std::string &filename) { |
| 467 | MapArchive(); |
| 468 | |
| 469 | SimplifyFilename(filename); |
| 470 | |
| 471 | // Find in the map |
| 472 | ZipFileInfoMap::const_iterator zip_it = m_ArchiveMap.find(filename); |
| 473 | if (zip_it == m_ArchiveMap.cend()) |
| 474 | return nullptr; |
| 475 | |
| 476 | const ZipFileInfo &zip_file = (*zip_it).second; |
| 477 | return zip_file.Extract(filename, m_ZipFileHandle); |
| 478 | } |
| 479 | |
| 480 | // ---------------------------------------------------------------- |
| 481 | inline void ReplaceAll(std::string &data, const std::string &before, const std::string &after) { |