ZIP_FILE_SET_EXTERNAL_ATTRIBUTES(3)
π ZIP_FILE_SET_EXTERNAL_ATTRIBUTES π
okay bestie, we're in the Library Functions Manual section of the libzip cinematic universe, and today's main character is zip_file_set_external_attributes β yes that name is a mouthful, no we are not shortening it, it's iconic actually. π
β¨ NAME β¨
zip_file_set_external_attributes β set external attributes for a file in a zip ποΈβ¨
π LIBRARY π
libzip (-lzip) π«Ά
π¦ SYNOPSIS π¦
#include <zip.h>
int
zip_file_set_external_attributes(zip_t *archive, zip_uint64_t index,
zip_flags_t flags, zip_uint8_t opsys, zip_uint32_t attributes);
πΈ DESCRIPTION πΈ
so the zip_file_set_external_attributes() function does exactly what it says on the tin, no cap: it sets the operating system and the external attributes for the file sitting at position index inside the zip archive. π
and like, right now? no flags are supported. zero. none. the flags param is lowkey just vibing there. π
if you wanna know which opsys values are even legal to pass, go check out zip_file_get_external_attributes(3) β it's the whole lore drop. πβ¨
π RETURN VALUES π
- if everything goes slay:
0is returned. periodt. β - if it does NOT go slay:
-1is returned, and the error info insidearchivegets set to tell you what went wrong. π
π₯ ERRORS π₯
zip_file_set_external_attributes() fails β like, actually gives up β if:
[ZIP_ER_INVAL]βindexis not a valid file index inarchive. π«[ZIP_ER_MEMORY]β the memory it needed could not be allocated. π[ZIP_ER_RDONLY]β the archive was opened in read-only mode, so bestieβ¦ you literally cannot write to it. π ββοΈ
π SEE ALSO π
libzip(3), zip_file_get_external_attributes(3) π«Ά
π°οΈ HISTORY π°οΈ
zip_file_set_external_attributes() was added in libzip 0.11.2 β a true veteran, we stan an OG. π
π AUTHORS π
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β the two icons who made this happen, show them some respect fr fr. π
and that's the whole page, bestie!! this lil beauty comes to you courtesy of Debian, dated December 18 β so go forth, set those external attributes, and stay iconic. mwah. π β¨π
π¦ 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) 2013-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