zzip_closedir(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_closedir β€” the zzip_closedir(3) page, but make it make sense πŸ’–

okay bestie, sit down, hydrate, because we're reading a page from the zziplib Function List and honestly? it's short and it's iconic.


✨ NAME ✨

zzip_closedir β€” stop usage.

like. that's it. that's the whole name section. it's giving "we said what we said." πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <zzip/lib.h>

int
zzip_closedir(ZZIP_DIR* dir)

so you include <zzip/lib.h> (yes, with the angle brackets, don't be weird about it), and you call zzip_closedir with a ZZIP_DIR* called dir, and it hands you back an int. periodt.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea. 🌸

The zzip_closedir function is the equivalent of closedir(3) for a realdir or zipfile. so if you already know closedir(3), congrats, you basically know this. iykyk.

and now the part that is actually magic β€” no cap, the manpage literally calls it magic: if the given arg-ZZIP_DIR is a real directory, it will call the real closedir(3) and then free the wrapping ZZIP_DIR structure. Otherwise it will divert to zzip_dir_close which will free the ZZIP_DIR structure.

so like… it checks the vibe. real dir? it does the real closedir(3) thing and then frees the wrapper. not a real dir? it hands you off to zzip_dir_close, which frees the ZZIP_DIR structure. either way you end up with a freed ZZIP_DIR structure and a clean conscience. 🧚✨

bestie reminder: this is the "stop usage" function. you open the thing, you do the thing, and then you close the thing. skipping this step is how you leak. we do not leak in this house. πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

Guido Draheim <guidod@gmx.de> β€” the main character who wrote all of this. we stan. 🫢


Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL).

so like, use it, remix it, just keep it copyleft and respect the LGPL/MPL. that's the deal. no cap. 🌈


🌟 SEE ALSO 🌟

hmm, this page doesn't ship a SEE ALSO section, bestie β€” but the DESCRIPTION is out here name-dropping closedir(3) and zzip_dir_close like they're in the group chat, so those are your lore-adjacent besties if you wanna go read more. πŸ’–


and that's the whole page!! 🌸 this was zziplib version 0.13.78, zzip_closedir(3), closing things out β€” literally. stay hydrated, close your dirs, and slay πŸ’…βœ¨πŸŽ€