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

Method open_internal

utility/file_access_apk.cpp:316–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316Error FileAccessAPK::open_internal(const String &p_path, int p_mode_flags) {
317 _close();
318
319 ERR_FAIL_COND_V(p_mode_flags & FileAccess::WRITE, FAILED);
320 APKArchive *arch = APKArchive::get_singleton();
321 ERR_FAIL_COND_V(!arch, FAILED);
322 zfile = arch->get_file_handle(p_path);
323 ERR_FAIL_COND_V(!zfile, FAILED);
324
325 int err = unzGetCurrentFileInfo64(zfile, &file_info, nullptr, 0, nullptr, 0, nullptr, 0);
326 ERR_FAIL_COND_V(err != UNZ_OK, FAILED);
327
328 return OK;
329}
330
331void FileAccessAPK::_close() {
332 if (!zfile) {

Callers

nothing calls this directly

Calls 1

get_file_handleMethod · 0.80

Tested by

no test coverage detected