zzip_file_real(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_file_real β€” bestie edition πŸ’–

okay so this page is from the zziplib Function List manual (that's the <pink>3</pink> section, iykyk), and we're about to vibe check four little functions that tell you whether the thing you're holding is a real file/dir or a zipped-up one. no cap, it's giving very useful.


✨ NAME ✨

zzip_file_real, zzip_dir_real, zzip_realdir, zzip_realfd β€” check real or zipped file.


🌸 SYNOPSIS 🌸

#include <zzip/lib.h>

int
zzip_file_real(ZZIP_FILE* fp)

int
zzip_dir_real(ZZIP_DIR* dir)

void*
zzip_realdir(ZZIP_DIR* dir)

int
zzip_realfd(ZZIP_FILE* fp)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, four functions, four little vibes. let's go. πŸ’…

zzip_file_real β€” this one looks at your ZZIP_FILE-handle and is like "hmm, are you wrapping a real file, or are you a file that lives inside a zip-archive?" πŸ•΅οΈ It returns 1 for a stat'able file, and 0 for a file inside a zip-archive. literally that simple, bestie.

zzip_dir_real β€” same energy but for directories. It checks if your ZZIP_DIR-handle is wrapping a real directory or a zip-archive. Returns 1 for a stat'able directory, and 0 for a handle to zip-archive. πŸ‘‘

zzip_realdir β€” this one hands you the posix DIR* handle (if one exists). but listen β€” check before with zzip_dir_real to see if the the ZZIP_DIR points to a real directory. don't just grab it and hope, that's not the move. πŸ™ˆ

zzip_realfd β€” same deal but it's the posix file descriptor (if one exists). and again, check before with zzip_file_real to see if the the ZZIP_FILE points to a real file. fr fr, do the vibe check first. ✨


πŸ‘‘ AUTHOR πŸ‘‘

Guido Draheim <guidod@gmx.de>


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


and that's the whole page, bestie!! 🫢 this lil slice of zziplib 0.13.78 is all yours β€” go forth, check your realness, slay. πŸ’–βœ¨πŸŒΈ