| 324 | } |
| 325 | |
| 326 | uint64_t ObjectAsset::GetSize() const |
| 327 | { |
| 328 | if (_zipPath.empty()) |
| 329 | { |
| 330 | return File::GetSize(_path); |
| 331 | } |
| 332 | |
| 333 | auto zipArchive = Zip::TryOpen(_zipPath, ZipAccess::read); |
| 334 | if (zipArchive != nullptr) |
| 335 | { |
| 336 | auto index = zipArchive->GetIndexFromPath(_path); |
| 337 | if (index.has_value()) |
| 338 | { |
| 339 | auto size = zipArchive->GetFileSize(index.value()); |
| 340 | return size; |
| 341 | } |
| 342 | } |
| 343 | return 0; |
| 344 | } |
| 345 | |
| 346 | std::vector<uint8_t> ObjectAsset::GetData() const |
| 347 | { |
no test coverage detected