| 235 | } |
| 236 | |
| 237 | Bytes getFile(const Path& path) override |
| 238 | { |
| 239 | mount(); |
| 240 | if (path.size() != 1) |
| 241 | throw BadPathException(); |
| 242 | |
| 243 | auto dirent = findFile(path.front()); |
| 244 | dirent->zd.rewind(); |
| 245 | |
| 246 | Bytes bytes; |
| 247 | ByteWriter bw(bytes); |
| 248 | while (!dirent->zd.eof) |
| 249 | { |
| 250 | bw += dirent->zd.readRecord(); |
| 251 | } |
| 252 | |
| 253 | return bytes.slice(0, dirent->length); |
| 254 | } |
| 255 | |
| 256 | private: |
| 257 | void mount() |
nothing calls this directly
no test coverage detected