| 229 | } |
| 230 | |
| 231 | bool FileAccessEncryptedv3::store_buffer(const uint8_t *p_src, uint64_t p_length) { |
| 232 | ERR_FAIL_COND_V_MSG(!writing, false, "File has not been opened in write mode."); |
| 233 | ERR_FAIL_COND_V(!p_src && p_length > 0, false); |
| 234 | |
| 235 | if (pos < get_length()) { |
| 236 | for (uint64_t i = 0; i < p_length; i++) { |
| 237 | store_8(p_src[i]); |
| 238 | } |
| 239 | } else if (pos == get_length()) { |
| 240 | data.resize(pos + p_length); |
| 241 | for (uint64_t i = 0; i < p_length; i++) { |
| 242 | data.write[pos + i] = p_src[i]; |
| 243 | } |
| 244 | pos += p_length; |
| 245 | } |
| 246 | return true; |
| 247 | } |
| 248 | |
| 249 | void FileAccessEncryptedv3::flush() { |
| 250 | ERR_FAIL_COND_MSG(!writing, "File has not been opened in write mode."); |
no test coverage detected