ARCHIVE_READ_OPTIONS(3)
π ARCHIVE_READ_OPTIONS π
okay so bestie, welcome to the archive_read_options(3) page β that's the manual for the Library Functions Manual section 3, and it's literally all about the lil functions that let you control options for reading archives. libarchive girlies, this one's for you π«Ά
β¨ LIBRARY β¨
Streaming Archive Library (libarchive, -larchive) β yes queen, we're linking the real thing π
π¦ SYNOPSIS π¦
int
archive_read_set_filter_option(struct archive *, const char *module,
const char *option, const char *value);
int
archive_read_set_format_option(struct archive *, const char *module,
const char *option, const char *value);
int
archive_read_set_option(struct archive *, const char *module,
const char *option, const char *value);
int
archive_read_set_options(struct archive *, const char *options);
πΈ DESCRIPTION πΈ
These functions are literally the way for libarchive clients to configure specific read modules. no cap, that's the whole vibe π
archive_read_set_filter_option(),archive_read_set_format_option()β Specifies an option that gets passed to the currently-registered filters (decompression filters included, bestie, we love a two-for-one) or format readers.
okay so the rules of the game here:
- If
optionandvalueare bothNULL, these functions do nothing andARCHIVE_OKcomes back. chill behaviour, honestly. - If
optionisNULLbutvalueis not, these functions do nothing andARCHIVE_FAILEDcomes back. it's giving "you forgot the important part" π - If
moduleis notNULL,optionandvalueget handed to the filter or reader namedmodule. The return value will be that of the module. And if there's no such module?ARCHIVE_FAILED. rip. - If
moduleisNULL,optionandvalueget handed to every registered module. If any module returnsARCHIVE_FATAL, that value gets returned immediately β no waiting, no negotiating π. Otherwise,ARCHIVE_OKgets returned if any module accepts the option, andARCHIVE_FAILEDin all other cases.
archive_read_set_option()β Callsarchive_read_set_format_option(), thenarchive_read_set_filter_option(). If either one returnsARCHIVE_FATAL,ARCHIVE_FATALgets returned immediately. Otherwise, the greater of the two values gets returned. teamwork, but make it ranked πarchive_read_set_options()βoptionsis a comma-separated list of options. IfoptionsisNULLor empty,ARCHIVE_OKgets returned immediately. periodt.
It calls archive_read_set_option() with each option in turn. If any archive_read_set_option() call returns ARCHIVE_FATAL, ARCHIVE_FATAL gets returned immediately.
Individual options have one of the following forms:
option=valueβ The option/value pair gets provided to every module. Modules that don't accept an option with this name will just ignore it. not their business, moving on πoptionβ The option gets provided to every module with a value ofβ1β.!optionβ The option gets provided to every module with aNULLvalue.module:option=value,module:option,module:!optionβ As above, but the corresponding option and value get provided only to modules whose name matchesmodule.
π₯ OPTIONS π₯
ngl this section is long, but every single one of these is real and you're gonna wanna know them, so let's go bestie π«Ά
- Format
cabhdrcharsetβ The value is used as a character set name that will be used when translating file names.
- Format
cpiocompat-2xβ Libarchive 2.x incorrectly encoded Unicode filenames on some platforms. This option mimics the libarchive 2.x filename handling so that such archives can be read correctly. it's a time machine but for filename bugs π°οΈhdrcharsetβ The value is used as a character set name that will be used when translating file names.pwbβ When reading a binary CPIO archive, assume that it's in the original PWB cpio format, and handle file mode bits accordingly. The default is to assume v7 format. so if you don't say anything, it's v7 energy β¨
- Format
iso9660jolietβ Support Joliet extensions. Defaults to enabled, use!jolietto disable.rockridgeβ Support RockRidge extensions. Defaults to enabled, use!rockridgeto disable.
- Format
lhahdrcharsetβ The value is used as a character set name that will be used when translating file names.
- Format
mtreecheckfsβ Allow reading information missing from the mtree from the file system. Disabled by default. (so like, opt in, bestie, don't just assume π)
- Format
rarhdrcharsetβ The value is used as a character set name that will be used when translating file names.
- Format
tarcompat-2xβ Libarchive 2.x incorrectly encoded Unicode filenames on some platforms. This option mimics the libarchive 2.x filename handling so that such archives can be read correctly.hdrcharsetβ The value is used as a character set name that will be used when translating file names.mac-extβ Support Mac OS metadata extension that records data in special files beginning with a period and underscore. Defaults to enabled on Mac OS, disabled on other platforms. Use!mac-extto disable.read_concatenated_archivesβ Ignore zeroed blocks in the archive, which occurs when multiple tar archives have been concatenated together. Without this option, only the contents of the first concatenated archive would be read. main character energy for archive number one only, otherwise π
- Format
zipcompat-2xβ Libarchive 2.x incorrectly encoded Unicode filenames on some platforms. This option mimics the libarchive 2.x filename handling so that such archives can be read correctly.hdrcharsetβ The value is used as a character set name that will be used when translating file names.ignorecrc32β Skip the CRC32 check. Mostly used for testing. (so likeβ¦ careful, bestie, that check is there for a reason π¨)mac-extβ Support Mac OS metadata extension that records data in special files beginning with a period and underscore. Defaults to enabled on Mac OS, disabled on other platforms. Use!mac-extto disable.
π ERRORS π
Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions. when something goes wrong, these two are your group chat β go ask them π
π SEE ALSO π
tar(1), archive_read(3), archive_write_set_options(3), libarchive(3)
ok that's the whole page, you ate that fr fr π β¨
Debian Β· January 31, 2020 β that's the source and the date, mwah, slay, bye bestie ππ¦π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2011 Tim Kientzle
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms