| 377 | } |
| 378 | |
| 379 | uint64_t FileAccessAPK::get_buffer(uint8_t *p_dst, uint64_t p_length) const { |
| 380 | ERR_FAIL_COND_V(!p_dst && p_length > 0, -1); |
| 381 | ERR_FAIL_COND_V(!zfile, -1); |
| 382 | |
| 383 | at_eof = unzeof(zfile); |
| 384 | if (at_eof) { |
| 385 | return 0; |
| 386 | } |
| 387 | int64_t read = unzReadCurrentFile(zfile, p_dst, p_length); |
| 388 | ERR_FAIL_COND_V(read < 0, read); |
| 389 | if ((uint64_t)read < p_length) { |
| 390 | at_eof = true; |
| 391 | } |
| 392 | return read; |
| 393 | } |
| 394 | |
| 395 | Error FileAccessAPK::get_error() const { |
| 396 | if (!zfile) { |
no outgoing calls