ZIP_RENAME(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_RENAME ✨

okay bestie, gather round, we're talking about zip_rename β€” the obsolete interface for renaming a file inside a zip archive. yes she's old. yes she still works. no we're not gonna be weird about it πŸ’…

Manual page name: ZIP_RENAME(3). She lives in the Library Functions Manual section, she's a libzip girlie, and she's here to rename your files with zero drama. πŸŽ€


🌸 LIBRARY 🌸

libzip (-lzip)

like, you link against libzip with -lzip and you're in. that's the whole vibe. 🫢


πŸ’– SYNOPSIS πŸ’–

#include <zip.h>

int
zip_rename(zip_t *archive, zip_uint64_t index, const char *name);

so you pull in <zip.h>, and then it's zip_rename() with three lil besties: the archive, the index, and the name. simple. iconic. no cap. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, and it's giving legacy code energy:

zip_rename() is the obsolete version of zip_file_rename(3). like, she's the older sister who's still cool but everyone's moved on.

and what does she actually do? literally the same thing as calling zip_file_rename(3) with an empty flags argument. that's it. that's the whole plot. same behaviour, no extra seasoning, flags just sits there empty like 🧚

so if you're wondering "should I use this?" β€” bestie, the answer is right below in the HISTORY section, and it's a soft no. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

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

πŸ’€ HISTORY πŸ’€

storytime, because she has lore:

  • zip_rename() was added in libzip 0.6 β€” a simpler time, a gentler time 🌸
  • in libzip 0.10, the type of index was changed from int to zip_uint64_t β€” she got a little upgrade, we love growth ✨
  • it was deprecated in libzip 0.11 β€” and the message is clear: use zip_file_rename() instead, fr fr
⚠️ deprecated means deprecated, bestie. she still works, but you're on your own romantically. new code should be calling zip_file_rename(3), periodt.

🌈 AUTHORS 🌈

the icons who made her:

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

absolute legends, both of them πŸ‘‘


and that's the page!! Debian was the one who shipped this version, dated December 18, 2017, and the footer tag was ZIP_RENAME(3). mwah, go rename something responsibly πŸ’–πŸ¦‹πŸŽ€