| 157 | } |
| 158 | |
| 159 | ByteArray PackedAssetSource::read(String const& path) { |
| 160 | auto p = m_index.ptr(path); |
| 161 | if (!p) |
| 162 | throw AssetSourceException::format("Requested file '{}' does not exist in the packed assets file", path); |
| 163 | |
| 164 | ByteArray data(p->second, 0); |
| 165 | m_packedFile->readFullAbsolute(p->first, data.ptr(), p->second); |
| 166 | return data; |
| 167 | } |
| 168 | |
| 169 | } |
no test coverage detected