1ARCHIVE_READ_OPTIONS(3) BSD Library Functions Manual ARCHIVE_READ_OPTIONS(3)
2
4 archive_read_set_filter_option, archive_read_set_format_option,
5 archive_read_set_option, archive_read_set_options — functions controlling
6 options for reading archives
7
9 Streaming Archive Library (libarchive, -larchive)
10
12 int
13 archive_read_set_filter_option(struct archive *, const char *module,
14 const char *option, const char *value);
15
16 int
17 archive_read_set_format_option(struct archive *, const char *module,
18 const char *option, const char *value);
19
20 int
21 archive_read_set_option(struct archive *, const char *module,
22 const char *option, const char *value);
23
24 int
25 archive_read_set_options(struct archive *, const char *options);
26
28 These functions provide a way for libarchive clients to configure spe‐
29 cific read modules.
30
31 archive_read_set_filter_option(), archive_read_set_format_option()
32 Specifies an option that will be passed to currently-registered
33 filters (including decompression filters) or format readers.
34
35 If option and value are both NULL, these functions will do noth‐
36 ing and ARCHIVE_OK will be returned. If option is NULL but value
37 is not, these functions will do nothing and ARCHIVE_FAILED will
38 be returned.
39
40 If module is not NULL, option and value will be provided to the
41 filter or reader named module. The return value will be that of
42 the module. If there is no such module, ARCHIVE_FAILED will be
43 returned.
44
45 If module is NULL, option and value will be provided to every
46 registered module. If any module returns ARCHIVE_FATAL, this
47 value will be returned immediately. Otherwise, ARCHIVE_OK will
48 be returned if any module accepts the option, and ARCHIVE_FAILED
49 in all other cases.
50
51 archive_read_set_option()
52 Calls archive_read_set_format_option(), then
53 archive_read_set_filter_option(). If either function returns
54 ARCHIVE_FATAL, ARCHIVE_FATAL will be returned immediately. Oth‐
55 erwise, greater of the two values will be returned.
56
57 archive_read_set_options()
58 options is a comma-separated list of options. If options is NULL
59 or empty, ARCHIVE_OK will be returned immediately.
60
61 Calls archive_read_set_option() with each option in turn. If any
62 archive_read_set_option() call returns ARCHIVE_FATAL,
63 ARCHIVE_FATAL will be returned immediately.
64
65 Individual options have one of the following forms:
66 option=value
67 The option/value pair will be provided to every module.
68 Modules that do not accept an option with this name will
69 ignore it.
70 option The option will be provided to every module with a value
71 of “1”.
72 !option
73 The option will be provided to every module with a NULL
74 value.
75 module:option=value, module:option, module:!option
76 As above, but the corresponding option and value will be
77 provided only to modules whose name matches module.
78
80 Format cab
81 hdrcharset
82 The value is used as a character set name that will be
83 used when translating file names.
84 Format cpio
85 hdrcharset
86 The value is used as a character set name that will be
87 used when translating file names.
88 Format iso9660
89 joliet Support Joliet extensions. Defaults to enabled, use
90 !joliet to disable.
91 rockridge
92 Support RockRidge extensions. Defaults to enabled, use
93 !rockridge to disable.
94 Format lha
95 hdrcharset
96 The value is used as a character set name that will be
97 used when translating file names.
98 Format mtree
99 checkfs
100 Allow reading information missing from the mtree from the
101 file system. Disabled by default.
102 Format rar
103 hdrcharset
104 The value is used as a character set name that will be
105 used when translating file names.
106 Format tar
107 compat-2x
108 Libarchive 2.x incorrectly encoded Unicode filenames on
109 some platforms. This option mimics the libarchive 2.x
110 filename handling so that such archives can be read cor‐
111 rectly.
112 hdrcharset
113 The value is used as a character set name that will be
114 used when translating file names.
115 mac-ext
116 Support Mac OS metadata extension that records data in
117 special files beginning with a period and underscore.
118 Defaults to enabled on Mac OS, disabled on other plat‐
119 forms. Use !mac-ext to disable.
120 read_concatenated_archives
121 Ignore zeroed blocks in the archive, which occurs when
122 multiple tar archives have been concatenated together.
123 Without this option, only the contents of the first con‐
124 catenated archive would be read.
125
127 Detailed error codes and textual descriptions are available from the
128 archive_errno() and archive_error_string() functions.
129
131 tar(1), archive_read(3), archive_write_set_options(3), libarchive(3)
132
133BSD January 31, 2020 BSD