zzip_opendir(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

✨ NAME ✨

zzip_opendir, zzip_opendir_ext_io β€” start usage πŸ’…

okay so bestie, this is the zzip_opendir(3) page from the zziplib Function List, and it's literally just about kicking things off. starting. opening. the beginning of the journey πŸ¦‹


🌸 SYNOPSIS 🌸

#include <zzip/lib.h>

ZZIP_DIR*
zzip_opendir(zzip_char_t* filename)

ZZIP_DIR*
zzip_opendir_ext_io(zzip_char_t* filename, int o_modes, zzip_strings_t* ext, zzip_plugin_io_t io)

like. two functions. both handing you back a ZZIP_DIR*. slay πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

so zzip_opendir is basically the opendir(3) of the zzip world β€” same energy, but it works on a realdir or a zipfile. not me being versatile like that πŸ’…

and here's the magic part, no cap: if the path you hand it (filename) is actually a directory, it just wraps a real opendir(3) up inside a ZZIP_DIR structure. iconic behavior, truly.

otherwise β€” if it's not a directory β€” it diverts over to zzip_dir_open, which can also stick a .zip extension on there if it needs to in order to actually find the archive. it's giving "I'll find it, don't worry" 🧚✨

the error-code is mapped to errno(3), so your usual error-checking vibes apply.

then we have zzip_opendir_ext_io β€” this one lets you pass in explicit ext and io instead of rolling with the internal defaults. and listen: setting them to zero is equivalent to just calling zzip_opendir. same thing. fr fr.

⚠️ heads up bestie: the filename argument-path being a directory is what decides which path you go down β€” real opendir(3) wrapped in a ZZIP_DIR, or zzip_dir_open with the optional .zip extension. don't sleep on that detail.

🫢 AUTHOR 🫢

Guido Draheim <guidod@gmx.de> β€” we stan 🌈


Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL) πŸ’œ


and that's the whole page, bestie πŸŽ€ this was zziplib 0.13.78, manual page zzip_opendir(3) β€” go forth and open those dirs, mwah πŸ’‹πŸŒΈ