ZIP_DISCARD(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_DISCARD ✨

okay so bestie, welcome to the zip_discard page πŸ’– it lives in the libzip manual, and it's honestly the "nvm, forget I said anything" of the archive world. let's get into it 🫢


🌸 NAME 🌸

zip_discard β€” close zip archive and discard changes πŸ’…

πŸ“š LIBRARY πŸ“š

libzip (-lzip) β€” that's the link flag you're gonna want, no cap ✨

πŸŽ€ SYNOPSIS πŸŽ€

#include <zip.h>

void
zip_discard(zip_t *archive);

πŸ’– DESCRIPTION πŸ’–

so like, the zip_discard() function closes archive and frees the memory allocated for it πŸ”₯

and here's the main character moment: any changes to the archive are not written to disk and get discarded πŸ’€ like, gone. ghosted. never happened. periodt.

ngl this is the "close without saving" button of the libzip universe β€” if you had edits you actually cared about, they are NOT surviving this call πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

πŸ¦‹ HISTORY πŸ¦‹

zip_discard() was added in libzip 0.11 ⭐ an icon, a legend, and it's been here since 0.11 🧚

πŸ‘‘ AUTHORS πŸ‘‘

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

and that's the whole vibe 🌈 this little number came to you from the Debian edition, dated December 18, 2017 β€” shoutout to that date for real, slay πŸ’œ byeeee πŸŽ€