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

Function is_zip_file_pack

utility/gdre_settings.cpp:448–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448bool is_zip_file_pack(const String &p_path) {
449 Ref<ZIPReader> zip = memnew(ZIPReader);
450 Error err = zip->open(p_path);
451 if (err) {
452 return false;
453 }
454 auto files = zip->get_files();
455 for (int i = 0; i < files.size(); i++) {
456 if (files[i] == "engine.cfg" || files[i] == "engine.cfb" || files[i] == "project.godot" || files[i] == "project.binary") {
457 return true;
458 }
459 if (files[i].begins_with(".godot/")) {
460 return true;
461 }
462 }
463 return false;
464}
465String GDRESettings::get_home_dir() {
466#ifdef WINDOWS_ENABLED
467 return OS::get_singleton()->get_environment("USERPROFILE");

Callers 1

_load_embedded_zipsMethod · 0.85

Calls 2

openMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected