1ARCHIVE_READ_OPTIONS(3)  BSD Library Functions Manual  ARCHIVE_READ_OPTIONS(3)
2

NAME

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

LIBRARY

9     Streaming Archive Library (libarchive, -larchive)
10

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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             compat-2x
86                     Libarchive 2.x incorrectly encoded Unicode filenames on
87                     some platforms.  This option mimics the libarchive 2.x
88                     filename handling so that such archives can be read cor‐
89                     rectly.
90             hdrcharset
91                     The value is used as a character set name that will be
92                     used when translating file names.
93             pwb     When reading a binary CPIO archive, assume that it is in
94                     the original PWB cpio format, and handle file mode bits
95                     accordingly.  The default is to assume v7 format.
96     Format iso9660
97             joliet  Support Joliet extensions.  Defaults to enabled, use
98                     !joliet to disable.
99             rockridge
100                     Support RockRidge extensions.  Defaults to enabled, use
101                     !rockridge to disable.
102     Format lha
103             hdrcharset
104                     The value is used as a character set name that will be
105                     used when translating file names.
106     Format mtree
107             checkfs
108                     Allow reading information missing from the mtree from the
109                     file system.  Disabled by default.
110     Format rar
111             hdrcharset
112                     The value is used as a character set name that will be
113                     used when translating file names.
114     Format tar
115             compat-2x
116                     Libarchive 2.x incorrectly encoded Unicode filenames on
117                     some platforms.  This option mimics the libarchive 2.x
118                     filename handling so that such archives can be read cor‐
119                     rectly.
120             hdrcharset
121                     The value is used as a character set name that will be
122                     used when translating file names.
123             mac-ext
124                     Support Mac OS metadata extension that records data in
125                     special files beginning with a period and underscore.
126                     Defaults to enabled on Mac OS, disabled on other plat‐
127                     forms.  Use !mac-ext to disable.
128             read_concatenated_archives
129                     Ignore zeroed blocks in the archive, which occurs when
130                     multiple tar archives have been concatenated together.
131                     Without this option, only the contents of the first con‐
132                     catenated archive would be read.
133

ERRORS

135     Detailed error codes and textual descriptions are available from the
136     archive_errno() and archive_error_string() functions.
137

SEE ALSO

139     tar(1), archive_read(3), archive_write_set_options(3), libarchive(3)
140
141BSD                            January 31, 2020                            BSD
Impressum