MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_buffer

Method get_buffer

platform/android/file_access_android.cpp:118–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118uint64_t FileAccessAndroid::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
119 ERR_FAIL_COND_V(!p_dst && p_length > 0, -1);
120
121 int r = AAsset_read(asset, p_dst, p_length);
122
123 if (pos + p_length > len) {
124 eof = true;
125 }
126
127 if (r >= 0) {
128 pos += r;
129 if (pos > len) {
130 pos = len;
131 }
132 }
133
134 return r;
135}
136
137int64_t FileAccessAndroid::_get_size(const String &p_file) {
138 return AAsset_getLength64(asset);

Callers 15

set_native_iconMethod · 0.45
copy_and_rename_pdbMethod · 0.45
_process_iconMethod · 0.45
fixup_embedded_pckMethod · 0.45
loadMethod · 0.45
_truncateMethod · 0.45
_modify_templateMethod · 0.45
fixup_embedded_pckMethod · 0.45
_store_temp_fileFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected