ZIP_GET_NUM_FILES(3)

πŸ“¦
version 1.11.4 Β· 3 versions
, in arch rolling, debian trixie, fedora 43, fedora 44, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ZIP_GET_NUM_FILES πŸ’–

okay bestie, so this one is from Library Functions Manual and it's the ZIP_GET_NUM_FILES(3) page β€” yes the whole thing is literally named after the function, iconic behavior honestly.


✨ NAME ✨

zip_get_num_files β€” get number of files in archive (obsolete interface)

like... the name tells you everything, no cap.

πŸ“š LIBRARY πŸ“š

libzip (-lzip)

πŸŽ€ SYNOPSIS πŸŽ€

#include <zip.h>

int
zip_get_num_files(zip_t *archive);

look at her. one arg, one int. low maintenance queen.

🌸 DESCRIPTION 🌸

okay so first things first, and I need you to hear me on this one: this function is deprecated. like, it's giving "still here but we don't talk about it". the docs literally say:

This function is deprecated. Use zip_get_num_entries(3) instead.

so if you're writing new code, bestie, go use zip_get_num_entries(3). periodt.

but if you do call zip_get_num_files(), it returns the number of files in archive. that's the whole job. that's the vibe. πŸ¦‹

🫢 RETURN VALUES 🫢

  • zip_get_num_files() returns the number of files in the zip archive πŸŽ‰
  • or -1 if archive is NULL πŸ’€ (yeah, if you hand it nothing, it says nothing back β€” -1 is the "girl, no" of return values)

πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're the supporting cast and they ate πŸ’…

🌈 HISTORY 🌈

zip_get_num_files() was added in libzip 0.6. she was deprecated in libzip 0.11, and the docs say, and I quote:

use zip_get_num_entries(instead) instead.

ngl that sentence is doing its own thing, but we're keeping it exactly as it is because facts are facts and I do not edit the sacred text πŸ™ˆ

πŸ’œ AUTHORS πŸ’œ

Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>

absolute legends, fr fr ⭐


and that's the whole page!! from the Debian crew, this version landed on December 18, 2017 β€” shoutout to the ZIP_GET_NUM_FILES(3) girlies, stay deprecated, stay cute πŸ§šβ€β™€οΈπŸ’–βœ¨