MCPcopy Create free account
hub / github.com/assimp/assimp / open

Method open

code/Common/ZipArchiveIOSystem.cpp:106–123  ·  view source on GitHub ↗

----------------------------------------------------------------

Source from the content-addressed store, hash-verified

104
105// ----------------------------------------------------------------
106voidpf IOSystem2Unzip::open(voidpf opaque, const char *filename, int mode) {
107 IOSystem *io_system = reinterpret_cast<IOSystem *>(opaque);
108
109 const char *mode_fopen = nullptr;
110 if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER) == ZLIB_FILEFUNC_MODE_READ) {
111 mode_fopen = "rb";
112 } else {
113 if (mode & ZLIB_FILEFUNC_MODE_EXISTING) {
114 mode_fopen = "r+b";
115 } else {
116 if (mode & ZLIB_FILEFUNC_MODE_CREATE) {
117 mode_fopen = "wb";
118 }
119 }
120 }
121
122 return (voidpf)io_system->Open(filename, mode_fopen);
123}
124
125// ----------------------------------------------------------------
126voidpf IOSystem2Unzip::opendisk(voidpf opaque, voidpf stream, uint32_t number_disk, int mode) {

Callers

nothing calls this directly

Calls 1

OpenMethod · 0.45

Tested by

no test coverage detected