1<!-- Creator : groff version 1.22.4 --> 2<!-- CreationDate: Sun Aug 22 23:03:26 2021 --> 3<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 4"http://www.w3.org/TR/html4/loose.dtd"> 5<html> 6<head> 7<meta name="generator" content="groff -Thtml, see www.gnu.org"> 8<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> 9<meta name="Content-Style" content="text/css"> 10<style type="text/css"> 11 p { margin-top: 0; margin-bottom: 0; vertical-align: top } 12 pre { margin-top: 0; margin-bottom: 0; vertical-align: top } 13 table { margin-top: 0; margin-bottom: 0; vertical-align: top } 14 h1 { text-align: center } 15</style> 16<title></title> 17</head> 18<body> 19 20<hr> 21 22 23<p>ARCHIVE_READ_OPTIONS(3) BSD Library Functions Manual 24ARCHIVE_READ_OPTIONS(3)</p> 25 26<p style="margin-top: 1em"><b>NAME</b></p> 27 28 29<p style="margin-left:6%;"><b>archive_read_set_filter_option</b>, 30<b>archive_read_set_format_option</b>, 31<b>archive_read_set_option</b>, 32<b>archive_read_set_options</b> — functions 33controlling options for reading archives</p> 34 35<p style="margin-top: 1em"><b>LIBRARY</b></p> 36 37<p style="margin-left:6%;">Streaming Archive Library 38(libarchive, -larchive)</p> 39 40<p style="margin-top: 1em"><b>SYNOPSIS</b></p> 41 42<p style="margin-left:6%;"><i>int</i></p> 43 44 45<p><b>archive_read_set_filter_option</b>(<i>struct archive *</i>, 46<i>const char *module</i>, 47<i>const char *option</i>, 48<i>const char *value</i>);</p> 49 50<p style="margin-left:6%; margin-top: 1em"><i>int</i></p> 51 52 53<p><b>archive_read_set_format_option</b>(<i>struct archive *</i>, 54<i>const char *module</i>, 55<i>const char *option</i>, 56<i>const char *value</i>);</p> 57 58<p style="margin-left:6%; margin-top: 1em"><i>int</i></p> 59 60 61<p><b>archive_read_set_option</b>(<i>struct archive *</i>, 62<i>const char *module</i>, 63<i>const char *option</i>, 64<i>const char *value</i>);</p> 65 66<p style="margin-left:6%; margin-top: 1em"><i>int</i></p> 67 68 69<p><b>archive_read_set_options</b>(<i>struct archive *</i>, 70<i>const char *options</i>);</p> 71 72<p style="margin-top: 1em"><b>DESCRIPTION</b></p> 73 74<p style="margin-left:6%;">These functions provide a way 75for libarchive clients to configure specific read 76modules.</p> 77 78 79<p style="margin-top: 1em"><b>archive_read_set_filter_option</b>(), 80<b>archive_read_set_format_option</b>()</p> 81 82<p style="margin-left:17%;">Specifies an option that will 83be passed to currently-registered filters (including 84decompression filters) or format readers.</p> 85 86<p style="margin-left:17%; margin-top: 1em">If 87<i>option</i> and <i>value</i> are both NULL, these 88functions will do nothing and <b>ARCHIVE_OK</b> will be 89returned. If <i>option</i> is NULL but <i>value</i> is not, 90these functions will do nothing and <b>ARCHIVE_FAILED</b> 91will be returned.</p> 92 93<p style="margin-left:17%; margin-top: 1em">If 94<i>module</i> is not NULL, <i>option</i> and <i>value</i> 95will be provided to the filter or reader named 96<i>module</i>. The return value will be that of the module. 97If there is no such module, <b>ARCHIVE_FAILED</b> will be 98returned.</p> 99 100<p style="margin-left:17%; margin-top: 1em">If 101<i>module</i> is NULL, <i>option</i> and <i>value</i> will 102be provided to every registered module. If any module 103returns <b>ARCHIVE_FATAL</b>, this value will be returned 104immediately. Otherwise, <b>ARCHIVE_OK</b> will be returned 105if any module accepts the option, and <b>ARCHIVE_FAILED</b> 106in all other cases.</p> 107 108 109<p style="margin-top: 1em"><b>archive_read_set_option</b>()</p> 110 111<p style="margin-left:17%;">Calls 112<b>archive_read_set_format_option</b>(), then 113<b>archive_read_set_filter_option</b>(). If either function 114returns <b>ARCHIVE_FATAL</b>, <b>ARCHIVE_FATAL</b> will be 115returned immediately. Otherwise, greater of the two values 116will be returned.</p> 117 118 119<p style="margin-top: 1em"><b>archive_read_set_options</b>()</p> 120 121<p style="margin-left:17%;"><i>options</i> is a 122comma-separated list of options. If <i>options</i> is NULL 123or empty, <b>ARCHIVE_OK</b> will be returned 124immediately.</p> 125 126<p style="margin-left:17%; margin-top: 1em">Calls 127<b>archive_read_set_option</b>() with each option in turn. 128If any <b>archive_read_set_option</b>() call returns 129<b>ARCHIVE_FATAL</b>, <b>ARCHIVE_FATAL</b> will be returned 130immediately.</p> 131 132<p style="margin-left:17%; margin-top: 1em">Individual 133options have one of the following forms:</p> 134 135<p><i>option=value</i></p> 136 137<p style="margin-left:27%;">The option/value pair will be 138provided to every module. Modules that do not accept an 139option with this name will ignore it.</p> 140 141<p><i>option</i></p> 142 143<p style="margin-left:27%; margin-top: 1em">The option will 144be provided to every module with a value of 145“1”.</p> 146 147<p><i>!option</i></p> 148 149<p style="margin-left:27%;">The option will be provided to 150every module with a NULL value.</p> 151 152<p><i>module:option=value</i>, <i>module:option</i>, 153<i>module:!option</i></p> 154 155<p style="margin-left:27%;">As above, but the corresponding 156option and value will be provided only to modules whose name 157matches <i>module</i>.</p> 158 159<p style="margin-top: 1em"><b>OPTIONS</b> <br> 160Format cab <b><br> 161hdrcharset</b></p> 162 163<p style="margin-left:27%;">The value is used as a 164character set name that will be used when translating file 165names.</p> 166 167<p>Format cpio <b><br> 168compat-2x</b></p> 169 170<p style="margin-left:27%;">Libarchive 2.x incorrectly 171encoded Unicode filenames on some platforms. This option 172mimics the libarchive 2.x filename handling so that such 173archives can be read correctly.</p> 174 175<p><b>hdrcharset</b></p> 176 177<p style="margin-left:27%;">The value is used as a 178character set name that will be used when translating file 179names.</p> 180 181<p><b>pwb</b></p> 182 183<p style="margin-left:27%; margin-top: 1em">When reading a 184binary CPIO archive, assume that it is in the original PWB 185cpio format, and handle file mode bits accordingly. The 186default is to assume v7 format.</p> 187 188<p>Format iso9660 <b><br> 189joliet</b></p> 190 191<p style="margin-left:27%; margin-top: 1em">Support Joliet 192extensions. Defaults to enabled, use <b>!joliet</b> to 193disable.</p> 194 195<p><b>rockridge</b></p> 196 197<p style="margin-left:27%;">Support RockRidge extensions. 198Defaults to enabled, use <b>!rockridge</b> to disable.</p> 199 200<p>Format lha <b><br> 201hdrcharset</b></p> 202 203<p style="margin-left:27%;">The value is used as a 204character set name that will be used when translating file 205names.</p> 206 207<p>Format mtree <b><br> 208checkfs</b></p> 209 210<p style="margin-left:27%;">Allow reading information 211missing from the mtree from the file system. Disabled by 212default.</p> 213 214<p>Format rar <b><br> 215hdrcharset</b></p> 216 217<p style="margin-left:27%;">The value is used as a 218character set name that will be used when translating file 219names.</p> 220 221<p>Format tar <b><br> 222compat-2x</b></p> 223 224<p style="margin-left:27%;">Libarchive 2.x incorrectly 225encoded Unicode filenames on some platforms. This option 226mimics the libarchive 2.x filename handling so that such 227archives can be read correctly.</p> 228 229<p><b>hdrcharset</b></p> 230 231<p style="margin-left:27%;">The value is used as a 232character set name that will be used when translating file 233names.</p> 234 235<p><b>mac-ext</b></p> 236 237<p style="margin-left:27%;">Support Mac OS metadata 238extension that records data in special files beginning with 239a period and underscore. Defaults to enabled on Mac OS, 240disabled on other platforms. Use <b>!mac-ext</b> to 241disable.</p> 242 243<p><b>read_concatenated_archives</b></p> 244 245<p style="margin-left:27%;">Ignore zeroed blocks in the 246archive, which occurs when multiple tar archives have been 247concatenated together. Without this option, only the 248contents of the first concatenated archive would be 249read.</p> 250 251<p style="margin-top: 1em"><b>ERRORS</b></p> 252 253<p style="margin-left:6%;">Detailed error codes and textual 254descriptions are available from the <b>archive_errno</b>() 255and <b>archive_error_string</b>() functions.</p> 256 257<p style="margin-top: 1em"><b>SEE ALSO</b></p> 258 259<p style="margin-left:6%;">tar(1), archive_read(3), 260archive_write_set_options(3), libarchive(3)</p> 261 262<p style="margin-left:6%; margin-top: 1em">BSD 263January 31, 2020 BSD</p> 264<hr> 265</body> 266</html> 267