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

Method is_zip_file

utility/common.cpp:1548–1556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1546}
1547
1548bool gdre::is_zip_file(const String &p_path) {
1549 Ref<FileAccess> fa = FileAccess::open(p_path, FileAccess::READ);
1550 if (fa.is_null()) {
1551 return false;
1552 }
1553 uint8_t header[4];
1554 fa->get_buffer(header, 4);
1555 return header[0] == 0x50 && header[1] == 0x4b && header[2] == 0x03 && header[3] == 0x04;
1556}
1557
1558String gdre::get_safe_dir_name(const String &p_dir_name, bool p_allow_paths) {
1559 return OS::get_singleton()->get_safe_dir_name(p_dir_name, p_allow_paths);

Callers

nothing calls this directly

Calls 1

get_bufferMethod · 0.45

Tested by

no test coverage detected