f08af3e51eb334101d4a7cc1e3b3851aa1fe4a81
[platform/upstream/libarchive.git] / doc / html / archive_write_format.3.html
1 <!-- Creator     : groff version 1.22.4 -->
2 <!-- CreationDate: Mon Dec 30 01:41:24 2019 -->
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_WRITE_FORMAT(3) BSD Library Functions Manual
24 ARCHIVE_WRITE_FORMAT(3)</p>
25
26 <p style="margin-top: 1em"><b>NAME</b></p>
27
28
29 <p style="margin-left:6%;"><b>archive_write_set_format</b>,
30 <b>archive_write_set_format_7zip</b>,
31 <b>archive_write_set_format_ar</b>,
32 <b>archive_write_set_format_ar_bsd</b>,
33 <b>archive_write_set_format_ar_svr4</b>,
34 <b>archive_write_set_format_by_name</b>,
35 <b>archive_write_set_format_cpio</b>,
36 <b>archive_write_set_format_cpio_newc</b>,
37 <b>archive_write_set_format_filter_by_ext</b>,
38 <b>archive_write_set_format_filter_by_ext_def</b>,
39 <b>archive_write_set_format_gnutar</b>,
40 <b>archive_write_set_format_iso9660</b>,
41 <b>archive_write_set_format_mtree</b>,
42 <b>archive_write_set_format_mtree_classic</b>,
43 <b>archive_write_set_format_mtree_default</b>,
44 <b>archive_write_set_format_pax</b>,
45 <b>archive_write_set_format_pax_restricted</b>,
46 <b>archive_write_set_format_raw</b>,
47 <b>archive_write_set_format_shar</b>,
48 <b>archive_write_set_format_shar_dump</b>,
49 <b>archive_write_set_format_ustar</b>,
50 <b>archive_write_set_format_v7tar</b>,
51 <b>archive_write_set_format_warc</b>,
52 <b>archive_write_set_format_xar</b>,
53 <b>archive_write_set_format_zip</b> &mdash; functions for
54 creating archives</p>
55
56 <p style="margin-top: 1em"><b>LIBRARY</b></p>
57
58 <p style="margin-left:6%;">Streaming Archive Library
59 (libarchive, -larchive)</p>
60
61 <p style="margin-top: 1em"><b>SYNOPSIS</b></p>
62
63 <p style="margin-left:6%;"><b>#include
64 &lt;archive.h&gt;</b></p>
65
66 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
67
68
69 <p style="margin-left:12%;"><b>archive_write_set_format</b>(<i>struct&nbsp;archive&nbsp;*</i>,
70 <i>int&nbsp;code</i>);</p>
71
72 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
73
74
75 <p style="margin-left:12%;"><b>archive_write_set_format_7zip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
76
77 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
78
79
80 <p style="margin-left:12%;"><b>archive_write_set_format_ar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
81
82 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
83
84
85 <p style="margin-left:12%;"><b>archive_write_set_format_ar_bsd</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
86
87 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
88
89
90 <p style="margin-left:12%;"><b>archive_write_set_format_ar_svr4</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
91
92 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
93
94
95 <p style="margin-left:12%;"><b>archive_write_set_format_by_name</b>(<i>struct&nbsp;archive&nbsp;*</i>,
96 <i>const&nbsp;char&nbsp;*name</i>);</p>
97
98 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
99
100
101 <p style="margin-left:12%;"><b>archive_write_set_format_cpio</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
102
103 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
104
105
106 <p style="margin-left:12%;"><b>archive_write_set_format_cpio_newc</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
107
108 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
109
110
111 <p style="margin-left:12%;"><b>archive_write_set_format_filter_by_ext</b>(<i>struct&nbsp;archive&nbsp;*</i>,
112 <i>const&nbsp;char&nbsp;*filename</i>);</p>
113
114 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
115
116
117 <p style="margin-left:12%;"><b>archive_write_set_format_filter_by_ext_def</b>(<i>struct&nbsp;archive&nbsp;*</i>,
118 <i>const&nbsp;char&nbsp;*filename</i>,
119 <i>const&nbsp;char&nbsp;*def_ext</i>);</p>
120
121 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
122
123
124 <p style="margin-left:12%;"><b>archive_write_set_format_gnutar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
125
126 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
127
128
129 <p style="margin-left:12%;"><b>archive_write_set_format_iso9660</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
130
131 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
132
133
134 <p style="margin-left:12%;"><b>archive_write_set_format_mtree</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
135
136 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
137
138
139 <p style="margin-left:12%;"><b>archive_write_set_format_pax</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
140
141 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
142
143
144 <p style="margin-left:12%;"><b>archive_write_set_format_pax_restricted</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
145
146 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
147
148
149 <p style="margin-left:12%;"><b>archive_write_set_format_raw</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
150
151 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
152
153
154 <p style="margin-left:12%;"><b>archive_write_set_format_shar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
155
156 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
157
158
159 <p style="margin-left:12%;"><b>archive_write_set_format_shar_dump</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
160
161 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
162
163
164 <p style="margin-left:12%;"><b>archive_write_set_format_ustar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
165
166 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
167
168
169 <p style="margin-left:12%;"><b>archive_write_set_format_v7tar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
170
171 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
172
173
174 <p style="margin-left:12%;"><b>archive_write_set_format_warc</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
175
176 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
177
178
179 <p style="margin-left:12%;"><b>archive_write_set_format_xar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
180
181 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
182
183
184 <p style="margin-left:12%;"><b>archive_write_set_format_zip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
185
186 <p style="margin-top: 1em"><b>DESCRIPTION</b></p>
187
188 <p style="margin-left:6%;">These functions set the format
189 that will be used for the archive.</p>
190
191 <p style="margin-left:6%; margin-top: 1em">The library can
192 write a variety of common archive formats.</p>
193
194
195 <p style="margin-top: 1em"><b>archive_write_set_format</b>()</p>
196
197 <p style="margin-left:17%;">Sets the format based on the
198 format code (see <i>archive.h</i> for the full list of
199 format codes). In particular, this can be used in
200 conjunction with <b>archive_format</b>() to create a new
201 archive with the same format as an existing archive.</p>
202
203
204 <p style="margin-top: 1em"><b>archive_write_set_format_by_name</b>()</p>
205
206 <p style="margin-left:17%;">Sets the corresponding format
207 based on the common name.</p>
208
209
210 <p style="margin-top: 1em"><b>archive_write_set_format_filter_by_ext</b>(),
211 <b>archive_write_set_format_filter_by_ext_def</b>()</p>
212
213 <p style="margin-left:17%;">Sets both filters and format
214 based on the output filename. Supported extensions: .7z,
215 .zip, .jar, .cpio, .iso, .a, .ar, .tar, .tgz, .tar.gz,
216 .tar.bz2, .tar.xz</p>
217
218
219 <p style="margin-top: 1em"><b>archive_write_set_format_7zip</b>()
220 <b>archive_write_set_format_ar_bsd</b>(),
221 <b>archive_write_set_format_ar_svr4</b>(),
222 <b>archive_write_set_format_cpio</b>()
223 <b>archive_write_set_format_cpio_newc</b>()
224 <b>archive_write_set_format_gnutar</b>()
225 <b>archive_write_set_format_iso9660</b>()
226 <b>archive_write_set_format_mtree</b>()
227 <b>archive_write_set_format_mtree_classic</b>()
228 <b>archive_write_set_format_pax</b>()
229 <b>archive_write_set_format_pax_restricted</b>()
230 <b>archive_write_set_format_raw</b>()
231 <b>archive_write_set_format_shar</b>()
232 <b>archive_write_set_format_shar_dump</b>()
233 <b>archive_write_set_format_ustar</b>()
234 <b>archive_write_set_format_v7tar</b>()
235 <b>archive_write_set_format_warc</b>()
236 <b>archive_write_set_format_xar</b>()
237 <b>archive_write_set_format_zip</b>()</p>
238
239 <p style="margin-left:17%;">Set the format as specified.
240 More details on the formats supported by libarchive can be
241 found in the libarchive-formats(5) manual page.</p>
242
243 <p style="margin-top: 1em"><b>RETURN VALUES</b></p>
244
245 <p style="margin-left:6%;">These functions return
246 <b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
247
248 <p style="margin-top: 1em"><b>ERRORS</b></p>
249
250 <p style="margin-left:6%;">Detailed error codes and textual
251 descriptions are available from the <b>archive_errno</b>()
252 and <b>archive_error_string</b>() functions.</p>
253
254 <p style="margin-top: 1em"><b>SEE ALSO</b></p>
255
256 <p style="margin-left:6%;">tar(1), archive_write(3),
257 archive_write_set_options(3), libarchive(3), cpio(5),
258 libarchive-formats(5), mtree(5), tar(5)</p>
259
260 <p style="margin-left:6%; margin-top: 1em">BSD
261 February&nbsp;14, 2013 BSD</p>
262 <hr>
263 </body>
264 </html>