ZIP_GET_NUM_ENTRIES(3)
π ZIP_GET_NUM_ENTRIES π
okay bestie, welcome to ZIP_GET_NUM_ENTRIES(3) β a page from the Library Functions Manual, which is just fancy speak for "the docs for the functions in a library." And babes, this one is a whole mood. Let's get into it. π
β¨ NAME β¨
zip_get_num_entries β get the number of entries in an archive ποΈ
π LIBRARY π
libzip β and you link it with -lzip. yes, that's literally it. slay. π
πΈ SYNOPSIS πΈ
here's the vibe, verbatim, no notes:
#include <zip.h>
zip_int64_t
zip_get_num_entries(zip_t *archive, zip_flags_t flags);
two args. one zip_t * and one zip_flags_t. iconic. π¦
π« DESCRIPTION π«
okay so, zip_get_num_entries() returns the number of entries in archive. periodt. π
and "entries" here means all the files that are present in the original archive or that were added while the archive is open. not me counting deleted files too π β and yes, that's on purpose! This includes deleted files, because the indices don't get renumbered until the archive is closed. which is lowkey a flex, because (this allows one to refer to deleted files, e.g. to undelete them.) β the way that the library literally keeps a seat warm for your deleted file so you can bring it back?? main character energy fr. π
and if flags is set to ZIP_FL_UNCHANGED, you get the original number of files back. the untouched, pre-chaos count. β¨
π«Ά RETURN VALUES π«Ά
zip_get_num_entries() returns the number of entries in the zip archive.
or -1 if archive is NULL. that's the "bestie where is your archive" case. π
π SEE ALSO π
the whole friend group, go say hi:
π°οΈ HISTORY π°οΈ
the lore, because i know you wanna know:
zip_get_num_entries()was added in libzip 0.10.- in libzip 0.11 the return type was changed from
zip_uint64_ttozip_int64_t. - in libzip 0.11 the type of flags was changed from
inttozip_flags_t.
growth. evolution. character development. π±
π§ AUTHORS π§
the icons themselves: Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>. thank you for your service. π«‘π
π one last thing, bestie: this page is the Debian build, dated August 19, 2022. love that for us. now go count some entries, you absolute legend. π β¨π
π¦ 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) 2011-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