MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_buffer

Method get_buffer

utility/file_access_apk.cpp:379–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379uint64_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
395Error FileAccessAPK::get_error() const {
396 if (!zfile) {

Callers 15

_load_settings_binaryMethod · 0.45
get_sha256_for_dirFunction · 0.45
is_macho_binaryMethod · 0.45
is_zip_fileMethod · 0.45
load_pack_uid_cacheMethod · 0.45
_do_string_loadMethod · 0.45
godot_readFunction · 0.45
try_open_packMethod · 0.45
read_and_write_fileMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_pck_filesFunction · 0.36