MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / close

Method close

source/MRMesh/MRZip.cpp:174–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172 operator zip_t *() const { return handle_; }
173 explicit operator bool() const { return handle_ != nullptr; }
174 int close()
175 {
176 if ( !handle_ )
177 return 0;
178 zip_register_progress_callback_with_state( handle_, 0.001f, zipProgressCallback, nullptr, &pd_ );
179#if (defined(LIBZIP_VERSION_MINOR) && LIBZIP_VERSION_MINOR >= 6 )
180 zip_register_cancel_callback_with_state( handle_, zipCancelCallback, nullptr, &pd_ );
181#endif
182 int res = zip_close( handle_ );
183 handle_ = nullptr;
184 return res;
185 }
186
187 /// Takes ownership of pre-deflated entries and registers them in the archive in order.
188 /// Entries stay alive for the AutoCloseZip's lifetime, so libzip's later zip_close (either

Callers 2

decompressZip_Function · 0.45
compressZipFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected