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 iso9660
81 joliet Support Joliet extensions. Defaults to enabled, use
82 !joliet to disable.
83 rockridge
84 Support RockRidge extensions. Defaults to enabled, use
85 !rockridge to disable.
86 Format tar
87 compat-2x
88 Libarchive 2.x incorrectly encoded Unicode filenames on
89 some platforms. This option mimics the libarchive 2.x
90 filename handling so that such archives can be read cor‐
91 rectly.
92 hdrcharset
93 The value is used as a character set name that will be
94 used when translating filenames.
95 mac-ext
96 Support Mac OS metadata extension that records data in
97 special files beginning with a period and underscore.
98 Defaults to enabled on Mac OS, disabled on other plat‐
99 forms. Use !mac-ext to disable.
100 read_concatenated_archives
101 Ignore zeroed blocks in the archive, which occurs when
102 multiple tar archives have been concatenated together.
103 Without this option, only the contents of the first con‐
104 catenated archive would be read.
105
107 Detailed error codes and textual descriptions are available from the
108 archive_errno() and archive_error_string() functions.
109
111 tar(1), libarchive(3), archive_write_set_options(3), archive_read(3)
112
113BSD February 2, 2012 BSD