zzip_dir_fdopen(3)
β¨ zzip_dir_fdopen β the fd reopen situation π
okay bestie, so this is a page straight out of the zziplib Function List, and today's main characters are zzip_dir_fdopen and zzip_dir_fdopen_ext_io. they do the fd reopen thing. let's get into it π«Ά
πΈ NAME πΈ
zzip_dir_fdopen, zzip_dir_fdopen_ext_io β fd reopen, no cap.
β¨ SYNOPSIS β¨
#include <zzip/lib.h>
ZZIP_DIR*
zzip_dir_fdopen(int fd, zzip_error_t* errcode_p)
ZZIP_DIR*
zzip_dir_fdopen_ext_io(int fd, zzip_error_t* errcode_p, zzip_strings_t* ext,
const zzip_plugin_io_t io)
π¦ DESCRIPTION π¦
so zzip_dir_fdopen is the function that zzip_dir_open and zzip_opendir(2) literally call. it opens the zip-archive as specified with the fd, and that fd points to a file that's already open, iykyk. then zzip_dir_fdopen goes and searches + parses the zip's central directory. iconic behavior honestly.
β οΈ NOTE: refcount is zero, so an_open/_closepair will also delete this_dirhandle. like, the close really said "and I took that personally" π plan accordingly.
and the zzip_dir_fdopen_ext_io function? she uses explicit ext and io instead of the internal defaults. setting those to zero is equivalent to just calling zzip_dir_fdopen. so if you're feeling lazy, zero is your bestie. π
π AUTHOR π
Guido Draheim <guidod@gmx.de> and Tomi Ollila <too@iki.fi> β the legends behind all this.
π COPYRIGHT π
Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL).
okay that's the whole page, bestie, go forth and parse those central directories πβ¨
zziplib 0.13.78 β yeah this whole thing is from the 0.13.78 era, dated and official, mwah π thanks for reading, ily, bye π¦π
π¦ where this page comes from
- centos-stream 10: zziplib-devel 0.13.78-2.el10 Β· LGPL-2.0-or-later OR MPL-1.1
- debian trixie: libzzip-dev 0.13.78+dfsg.1-0.1 Β· ZZIP
- fedora 43: zziplib-devel 0.13.78-2.fc43 Β· LGPL-2.0-or-later OR MPL-1.1
- fedora 43: zziplib-devel 0.13.78-2.fc43 Β· LGPL-2.0-or-later OR MPL-1.1
- fedora 44: zziplib-devel 0.13.78-4.fc44 Β· LGPL-2.0-or-later OR MPL-1.1
- fedora 44: zziplib-devel 0.13.78-4.fc44 Β· LGPL-2.0-or-later OR MPL-1.1
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- ubuntu questing: libzzip-dev 0.13.78+dfsg.1-0.1
- ubuntu resolute: libzzip-dev 0.13.78+dfsg.1-0.2 Β· ZZIP
- ubuntu stonking: libzzip-dev 0.13.78+dfsg.1-0.2 Β· ZZIP
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms