zzip_readdir(3)

πŸ“¦
version 0.13.78 Β· 4 versions
, in centos-stream 10, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– zzip_readdir β€” from the zziplib Function List, section 3 πŸŽ€

okay bestie, sit down, hydrate, and let me tell you about the little function that walks a zip like it's a real directory πŸ’…


✨ NAME ✨

zzip_readdir β€” read dir. that's it, that's the name, short and iconic πŸ‘‘


🌸 SYNOPSIS 🌸

#include <zzip/lib.h>

ZZIP_DIRENT*
zzip_readdir(ZZIP_DIR* dir)

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea πŸ“ β€” zzip_readdir is literally the equivalent of a readdir(2) call, except it works for a realdir or a zipfile that's referenced by the ZZIP_DIR you got back from zzip_opendir. same energy, different plumbing, no cap ✨

the ZZIP_DIR handle (you know, the one zzip_opendir hands you) actually contains a few more entries than what gets copied into the ZZIP_DIRENT. so like, don't go assuming every field is filled in, bestie 😭

the only valid fields in a ZZIP_DIRENT are:

  • d_name β€” the file name πŸ’–
  • d_compr β€” compression
  • d_csize β€” compressed size
  • st_size β€” uncompressed size
⚠️ vibe check: those four are it. the rest of the struct is giving "decorative", not "reliable". only trust the ones listed above, fr fr.

πŸ‘‘ AUTHOR πŸ‘‘

Guido Draheim <guidod@gmx.de> β€” the main character who wrote this 🌈


Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL) β€” so yes, share it, remix it, just keep the copyleft energy intact 🫢


🧚 SEE ALSO 🧚

readdir(2), zzip_opendir β€” go read those next, iykyk πŸ“š


and that's the whole page, bestie!! πŸŽ€ this one came straight out of zziplib version 0.13.78, living in section 3 of the manual, brought to you by the zziplib Function List ✨ slay, go read some directories πŸ’…πŸ’–