ManPageArchiveReadSetOptions3.wiki 6.6 KB

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