ZIP_ADD(3)
β¨ ZIP_ADD π
okay so bestie, listen β this page is literally called zip_add, and it's here to tell you about zip_add, zip_replace β add file to zip archive or replace file in zip archive (obsolete interface). yeah. it's giving "vintage, but make it functional." π
π LIBRARY
libzip (-lzip) β that's your girl, link against her and you're set. π«Ά
πΈ SYNOPSIS
#include <zip.h>
zip_int64_t
zip_add(zip_t *archive, const char *name, zip_source_t *source);
int
zip_replace(zip_t *archive, zip_uint64_t index, zip_source_t *source);
look at those signatures, they're so cute. β¨
π DESCRIPTION
okay so, real talk. The function zip_add() is the obsolete version of zip_file_add(3). Not deprecated-but-fine, not "we'll allow it" β obsolete. It is the same as calling zip_file_add(3) with an empty flags argument. That's it. That's the whole tea. π΅
Similarly (and I say this with love), the zip_replace() function is the obsolete version of zip_file_replace(3). It is the same as calling zip_file_replace(3) with an empty flags argument.
so like β they work, they do the thing, but they're the old way. the glow-up versions are right there. go get them. π
π SEE ALSO
(the last two are the main characters here, fr fr. π«Ά)
π°οΈ HISTORY
okay, storytime. π
zip_add() was added in libzip 0.6. Then in libzip 0.10 the return type was changed from int to zip_int64_t β glow-up era. It was deprecated in libzip 0.11, use zip_file_add() instead. π«
zip_replace() was added in libzip 0.6. In libzip 0.10 the type of index was changed from int to zip_uint64_t. It was deprecated in libzip 0.11, use zip_file_replace() instead. π«
bestie if you're out here writing new code with these: no. stop. the deprecated flag is up for a reason. use the zip_file_* versions. periodt. π
π AUTHORS
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β the icons who built this. bow down. πββοΈ
and that's the whole page, bestie!! this one came from Debian, dated December 18, 2017, and the manual page itself is ZIP_ADD(3). mwah. πβ¨π
π¦ where this page comes from
- arch rolling: libzip 1.11.4-1 Β· BSD
- debian trixie: libzip-dev 1.11.3-2 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- nixpkgs unstable: libzip 1.11.4
- ubuntu questing: libzip-dev 1.11.3-2
- ubuntu resolute: libzip-dev 1.11.4-2 Β· BSD-3-Clause
- ubuntu stonking: libzip-dev 1.11.4-2build1 Β· BSD-3-Clause
- Copyright (C) 2004-2017 Dieter Baron and Thomas Klausner
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms