| 116 | } |
| 117 | |
| 118 | uint64_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 | |
| 137 | int64_t FileAccessAndroid::_get_size(const String &p_file) { |
| 138 | return AAsset_getLength64(asset); |
no outgoing calls
no test coverage detected