zzip_dirhandle(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_dirhandle β€” get handle πŸ’–

okay bestie, so this is a zziplib function list page, and today's main characters are zzip_dirhandle and zzip_dirfd. their whole job? getting you a handle. that's it. that's the vibe. ✨


🌸 SYNOPSIS 🌸

#include <zzip/lib.h>

ZZIP_DIR*
zzip_dirhandle(ZZIP_FILE* fp)

int
zzip_dirfd(ZZIP_DIR* dir)

like. look at them. two little functions. so demure. so mindful. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first up, zzip_dirhandle β€” it literally just returns the fp->dir value. no cap, that's the whole thing. it's giving "I don't overthink, I just return the field." πŸ’…

and here's the tea: if a ZZIP_FILE is contained within a zip-file, that one is gonna be a valid pointer. but otherwise a NULL gets returned, and in that case the ZZIP_FILE wraps a real file. so like… pay attention to which one you got, bestie. 🫢

next, zzip_dirfd β€” it just returns dir->fd. again, no notes, it's an icon.

and same energy here: if a ZZIP_DIR does point to a zipfile, then the file-descriptor of that zipfile is what you get back. otherwise a NULL is returned, and the ZZIP_DIR wraps a real directory DIR β€” that's the case if you have dirent on your system. 🌈

⚠️ heads up: NULL here is not a "something went wrong" error, it's a "you're dealing with a real file / real directory instead of a zip" signal. different vibe entirely. πŸ‘‘

πŸ’œ AUTHOR πŸ’œ

Guido Draheim <guidod@gmx.de>

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


and that's the whole page, bestie!! this was the zziplib function list, version 0.13.78, zzip_dirhandle(3) β€” mwah, iconic, go forth and check your pointers. πŸ’–βœ¨πŸŽ€