ZIP_UNCHANGE_ALL(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_UNCHANGE_ALL β€” bestie edition ✨

ok so like. this is a page from the libzip manual (section 3, Library Functions Manual, the one you read when you're deep in C and vibing). it's called zip_unchange_all and it is literally the "undo everything" button for a zip archive. πŸ’–


🌸 NAME 🌸

zip_unchange_all β€” undo all changes in a zip archive

(yeah. all of them. the whole thing. we're hitting rewind. πŸŽ€)


πŸ¦‹ LIBRARY πŸ¦‹

libzip (-lzip)

so you gotta link against it, bestie β€” -lzip and you're in. ✨


πŸ’… SYNOPSIS πŸ’…

#include <zip.h>

int
zip_unchange_all(zip_t *archive);

look at her. so simple. so iconic. one function, one pointer, zero drama. πŸ‘‘


🫢 DESCRIPTION 🫢

okay so here's the tea: all changes to files and global information in archive are reverted.

that's it. that's the whole vibe. every file edit you made, every global bit of info you messed with β€” poof. gone. back to how the archive was before you started touching stuff. it's giving "we do a little time travel." βͺ✨

no cap, this is the nuclear undo. it doesn't care what you changed, it just un-changes it. πŸ™ˆ


⭐ RETURN VALUES ⭐

  • on success, it returns 0 πŸŽ‰
  • otherwise it returns -1, and the error code in archive is set to tell you what went wrong 😭

so like. always check the return value, bestie. it's not gonna text you back to let you know. πŸ’€


🌈 SEE ALSO 🌈

(the whole un-change cinematic universe. iykyk. πŸ”₯)


🧚 HISTORY 🧚

zip_unchange_all() was added in libzip 0.6.

an elder. a legend. she's been undoing our mistakes since way back. πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

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

the two icons who built the undo button. we owe them everything fr fr. 🫢


and that's the page!! this one came from the Debian build of the libzip manual, dated December 18, 2017 β€” so yeah, a little vintage, but still absolutely serving. πŸ’–βœ¨πŸŽ€

mwah, go forth and un-change responsibly πŸ’