| 9 | namespace openstudio { |
| 10 | |
| 11 | UnzipFile::UnzipFile(const openstudio::path& filename) : m_unzFile(unzOpen(openstudio::toString(filename).c_str())), m_chunksize(32768) { |
| 12 | if (!m_unzFile) { |
| 13 | if (!openstudio::filesystem::exists(filename)) { |
| 14 | throw std::runtime_error("UnzipFile " + openstudio::toString(filename) + " does not exist, could not be opened"); |
| 15 | } else { |
| 16 | throw std::runtime_error("UnzipFile " + openstudio::toString(filename) + " exists, could not be opened"); |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | UnzipFile::~UnzipFile() { |
| 22 | unzClose(m_unzFile); |
nothing calls this directly
no test coverage detected