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

Method open

modules/zip/zip_reader.cpp:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42#include "core/io/zip_io.h"
43
44Error ZIPReader::open(const String &p_path) {
45 if (fa.is_valid()) {
46 close();
47 }
48
49 zlib_filefunc_def io = zipio_create_io(&fa);
50 uzf = unzOpen2(p_path.utf8().get_data(), &io);
51 return uzf != nullptr ? OK : FAILED;
52}
53
54Error ZIPReader::close() {
55 ERR_FAIL_COND_V_MSG(fa.is_null(), FAILED, "ZIPReader cannot be closed because it is not open.");

Callers 1

test_zip.hFile · 0.45

Calls 4

zipio_create_ioFunction · 0.85
is_validMethod · 0.45
get_dataMethod · 0.45
utf8Method · 0.45

Tested by

no test coverage detected