ARCHIVE_WRITE_HEADER(3)
π ARCHIVE_WRITE_HEADER(3) π
okay bestie, so this one lives in the Library Functions Manual and it's literally all about creating archives β¨
π LIBRARY π
Streaming Archive Library β that's libarchive, and you link it with -larchive π«Ά
β¨ SYNOPSIS β¨
#include <archive.h>
int
archive_write_header(struct archive *, struct archive_entry *);
πΈ DESCRIPTION πΈ
So what this does is it builds a header and writes it out, using the data you already stuffed into the struct archive_entry you're passing in. that's the whole vibe π
ngl if you need to know how to actually make and fill up a struct archive_entry in the first place, go read archive_entry(3) β it's got you, i promise π¦
π« RETURN VALUES π«
She returns ARCHIVE_OK when everything slays. and if it doesn't, you get one of these instead:
ARCHIVE_RETRYβ for operations that might actually work if you just try again. like, it's not over, bestie, run it back πARCHIVE_WARNβ unusual conditions that don't stop you from doing more stuff. weird but we move πARCHIVE_FATALβ serious errors that make any remaining operations impossible. no coming back from this one, it's giving end of the line π
π ERRORS π
want the receipts? the detailed error codes and the textual descriptions are all available from the archive_errno() and archive_error_string() functions. she will tell you exactly what went wrong, fr fr π₯
π SEE ALSO π
tar(1), archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5)
and that's the whole page, babe π this one's from the Debian crew, dated February 2, 2012, and it's filed under ARCHIVE_WRITE_HEADER(3) β go write some headers, main character π§π
π¦ where this page comes from
- alpine 3.22: libarchive-doc 3.8.10-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.22: libarchive-doc 3.8.11-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.23: libarchive-doc 3.8.10-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.23: libarchive-doc 3.8.11-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.24: libarchive-doc 3.8.10-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.24: libarchive-doc 3.8.11-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- arch rolling: libarchive 3.8.10-1
- arch rolling: libarchive 3.8.11-1 Β· BSD-2-Clause AND BSD-4-Clause-UC AND Apache-2.0 OR CC0-1.0 OR OpenSSL
- arch rolling: libarchive 3.8.9-1
- centos-stream 10: libarchive-devel 3.7.7-11.el10 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- debian trixie: libarchive-dev 3.7.4-4+deb13u1 Β· BSD-2-Clause
- fedora 43: libarchive-devel 3.8.1-3.fc43 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 43: libarchive-devel 3.8.1-3.fc43 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 43: libarchive-devel 3.8.4-1.fc43 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 43: libarchive-devel 3.8.4-1.fc43 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 44: libarchive-devel 3.8.4-2.fc44 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 44: libarchive-devel 3.8.4-2.fc44 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 44: libarchive-devel 3.8.7-1.fc44 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 44: libarchive-devel 3.8.7-1.fc44 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixos 26.05: libarchive 3.8.9
- nixpkgs unstable: libarchive 3.8.9
- opensuse-leap 16.0: libarchive-devel 3.8.1-160000.4.1 Β· BSD-2-Clause
- opensuse-leap 16.0: libarchive-devel 3.8.1-160000.4.1 Β· BSD-2-Clause
- opensuse-leap 16.0: libarchive-devel 3.8.1-160000.4.1 Β· BSD-2-Clause
- opensuse-leap 16.0: libarchive-devel 3.8.1-160000.4.1 Β· BSD-2-Clause
- ubuntu questing: libarchive-dev 3.7.7-0ubuntu3
- ubuntu questing: libarchive-dev 3.7.7-0ubuntu3.2
- ubuntu resolute: libarchive-dev 3.8.5-1ubuntu2 Β· BSD-2-Clause
- ubuntu resolute: libarchive-dev 3.8.5-1ubuntu2.3 Β· BSD-2-Clause
- ubuntu stonking: libarchive-dev 3.8.9-1 Β· BSD-2-Clause
- Copyright (c) 2003-2011 Tim Kientzle
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms