ZIP_SET_ARCHIVE_FLAG(3)
β¨ ZIP_SET_ARCHIVE_FLAG(3) β¨
okay bestie, so this is a page from the Library Functions Manual, and it's literally all about zip_set_archive_flag π
like the name says, it sets an archive flag, and yes we are going to go through every single one of them together, no skipping π«Ά
π NAME π
zip_set_archive_flag β set zip archive flag
π LIBRARY π
libzip (-lzip)
no cap, you gotta link against it π
πΈ SYNOPSIS πΈ
#include <zip.h>
int
zip_set_archive_flag(zip_t *archive, zip_flags_t flag, int value);
π DESCRIPTION π
so the way that zip_set_archive_flag() works is it sets the flag flag for the archive archive to the value value. that's it, that's the whole vibe. set a flag, on an archive, to a value. iconic β¨
and here are the supported flags, bestie, listen up π§:
ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVEβ if this flag is cleared, the archive file gets removed when the archive is empty. if it's set, an empty archive will be created β which, heads up, is not recommended by the zip specification π so like, you can, but the spec is side-eyeing you the whole time.ZIP_AFL_RDONLYβ if this flag is set, no modification to the archive is allowed. periodt. and here's the tea: this flag can only be cleared if it was manually set withzip_set_archive_flag, not if the archive was opened read-only. so if you opened it read-only, that's locked in, no take-backs πZIP_AFL_WANT_TORRENTZIPβ if this flag is set, the archive will be written in torrentzip format. slay π₯
π¦ RETURN VALUES π¦
upon successful completion, 0 is returned, and -1 if an error occurred. so like, 0 = we ate, -1 = not me crying π
π SEE ALSO π
β HISTORY β
zip_set_archive_flag() was added in libzip 0.9. and then in libzip 0.11 the type of flag was changed from int to zip_flags_t β a glow-up fr fr π
ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE and ZIP_AFL_WANT_TORRENTZIP were added in libzip 1.10.0. new arrivals, welcome to the group chat π
π AUTHORS π
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>
give them their flowers, they wrote the whole thing πΈ
π and that's the page, bestie! this one came from the Debian build of the libzip manual, dated July 19, 2023 β go off, you understood the assignment π«Άβ¨
π¦ where this page comes from
- arch rolling: libzip 1.11.4-1 Β· BSD
- debian trixie: libzip-dev 1.11.3-2 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- nixpkgs unstable: libzip 1.11.4
- ubuntu questing: libzip-dev 1.11.3-2
- ubuntu resolute: libzip-dev 1.11.4-2 Β· BSD-3-Clause
- ubuntu stonking: libzip-dev 1.11.4-2build1 Β· BSD-3-Clause
- Copyright (C) 2008-2017 Dieter Baron and Thomas Klausner
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms