ZIP_ADD_DIR(3)

πŸ“¦
version 1.11.4 Β· 3 versions
, in arch rolling, debian trixie, fedora 43, fedora 44, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ zip_add_dir β€” bestie's guide to the obsolete directory-adding era πŸ’…

okay so real talk, you're looking at zip_add_dir from the libzip library functions manual, and it's giving "vintage, but not in the cute thrifted way." It's literally the obsolete interface for adding a directory to a zip archive. We love her, we respect her, but she's retired. πŸŽ€


🌸 NAME 🌸

zip_add_dir β€” add directory to zip archive (obsolete interface)


πŸ“š LIBRARY πŸ“š

libzip (-lzip) β€” that's the one you link against, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <zip.h>

zip_int64_t
zip_add_dir(zip_t *archive, const char *name);

Look at her. Two args, one return type. Simple. Iconic. Deprecated. 😭


πŸ’– DESCRIPTION πŸ’–

So here's the tea: zip_add_dir() is the obsolete version of zip_dir_add(3). Same energy, older era.

It's exactly the same as calling zip_dir_add(3) with an empty flags argument. That's it. That's the whole vibe. No extra seasoning, no hidden tricks β€” just the legacy wrapper doing legacy wrapper things. 🫢

ngl bestie, if you're writing new code, you should be using zip_dir_add(3). This one is here for the archives (pun fully intended) and for codebases that haven't gotten the memo yet. πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

  • libzip(3) β€” the whole library, the mothership, the main character
  • zip_dir_add(3) β€” the glow-up version, the one you actually want

⭐ HISTORY ⭐

The lore, chronologically, because we love a timeline:

  1. zip_add_dir() was added in libzip 0.8. Baby's first appearance. 🍼
  2. In libzip 0.10 the return type was changed from int to zip_int64_t. A lil glow-up, as a treat.
  3. It was deprecated in libzip 0.11 β€” use zip_dir_add() instead. And that's the part where we say our goodbyes. πŸ’

πŸ‘‘ AUTHORS πŸ‘‘

The legends themselves:

  • Dieter Baron <dillo@nih.at>
  • Thomas Klausner <wiz@gatalith.at>

and that's the whole page, bestie ✨

This one shipped as part of the Debian build, dated December 18, 2017 β€” so yeah, she's been sitting in the manpage collection looking cute and being deprecated for a minute. Old but gold. Periodt. πŸ’…πŸŒΈπŸ¦‹