open an existing zip entry. return: true if open, false otherwise
| 77 | // return: |
| 78 | // true if open, false otherwise |
| 79 | bool unzipper::openEntry(const char* filename) |
| 80 | { |
| 81 | if (isOpen()) |
| 82 | { |
| 83 | closeEntry(); |
| 84 | int err = unzLocateFile(zipFile_, filename, 0); |
| 85 | if (err == UNZ_OK) |
| 86 | { |
| 87 | err = unzOpenCurrentFile(zipFile_); |
| 88 | entryOpen_ = (err == UNZ_OK); |
| 89 | } |
| 90 | } |
| 91 | return entryOpen_; |
| 92 | } |
| 93 | |
| 94 | // Close the currently open zip entry. |
| 95 | void unzipper::closeEntry() |
no test coverage detected