summaryrefslogtreecommitdiff
path: root/archivers/libarchive/files/doc/html/archive_write_format.3.html
blob: 44a5cc45101f154af98ad204e04eb29252538f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Mon Sep  3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p>ARCHIVE_WRITE_FORMAT(3) BSD Library Functions Manual
ARCHIVE_WRITE_FORMAT(3)</p>

<p style="margin-top: 1em"><b>NAME</b></p>


<p style="margin-left:6%;"><b>archive_write_set_format</b>,
<b>archive_write_set_format_7zip</b>,
<b>archive_write_set_format_ar</b>,
<b>archive_write_set_format_ar_bsd</b>,
<b>archive_write_set_format_ar_svr4</b>,
<b>archive_write_set_format_by_name</b>,
<b>archive_write_set_format_cpio</b>,
<b>archive_write_set_format_cpio_newc</b>,
<b>archive_write_set_format_filter_by_ext</b>,
<b>archive_write_set_format_filter_by_ext_def</b>,
<b>archive_write_set_format_gnutar</b>,
<b>archive_write_set_format_iso9660</b>,
<b>archive_write_set_format_mtree</b>,
<b>archive_write_set_format_mtree_classic</b>,
<b>archive_write_set_format_mtree_default</b>,
<b>archive_write_set_format_pax</b>,
<b>archive_write_set_format_pax_restricted</b>,
<b>archive_write_set_format_raw</b>,
<b>archive_write_set_format_shar</b>,
<b>archive_write_set_format_shar_dump</b>,
<b>archive_write_set_format_ustar</b>,
<b>archive_write_set_format_v7tar</b>,
<b>archive_write_set_format_warc</b>,
<b>archive_write_set_format_xar</b>,
<b>archive_write_set_format_zip</b>, &mdash; functions for
creating archives</p>

<p style="margin-top: 1em"><b>LIBRARY</b></p>

<p style="margin-left:6%;">Streaming Archive Library
(libarchive, -larchive)</p>

<p style="margin-top: 1em"><b>SYNOPSIS</b></p>

<p style="margin-left:6%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int&nbsp;code</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_7zip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_ar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_ar_bsd</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_ar_svr4</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_by_name</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*name</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_cpio</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_cpio_newc</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_filter_by_ext</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*filename</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_filter_by_ext_def</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*filename</i>,
<i>const&nbsp;char&nbsp;*def_ext</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_gnutar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_iso9660</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_mtree</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_pax</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_pax_restricted</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_raw</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_shar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_shar_dump</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_ustar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_v7tar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_warc</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_xar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_write_set_format_zip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-top: 1em"><b>DESCRIPTION</b></p>

<p style="margin-left:6%;">These functions set the format
that will be used for the archive.</p>

<p style="margin-left:6%; margin-top: 1em">The library can
write a variety of common archive formats.</p>


<p style="margin-top: 1em"><b>archive_write_set_format</b>()</p>

<p style="margin-left:17%;">Sets the format based on the
format code (see <i>archive.h</i> for the full list of
format codes). In particular, this can be used in
conjunction with <b>archive_format</b>() to create a new
archive with the same format as an existing archive.</p>


<p style="margin-top: 1em"><b>archive_write_set_format_by_name</b>()</p>

<p style="margin-left:17%;">Sets the corresponding format
based on the common name.</p>


<p style="margin-top: 1em"><b>archive_write_set_format_filter_by_ext</b>(),
<b>archive_write_set_format_filter_by_ext_def</b>()</p>

<p style="margin-left:17%;">Sets both filters and format
based on the output filename. Supported extensions: .7z,
.zip, .jar, .cpio, .iso, .a, .ar, .tar, .tgz, .tar.gz,
.tar.bz2, .tar.xz</p>


<p style="margin-top: 1em"><b>archive_write_set_format_7zip</b>()
<b>archive_write_set_format_ar_bsd</b>(),
<b>archive_write_set_format_ar_svr4</b>(),
<b>archive_write_set_format_cpio</b>()
<b>archive_write_set_format_cpio_newc</b>()
<b>archive_write_set_format_gnutar</b>()
<b>archive_write_set_format_iso9660</b>()
<b>archive_write_set_format_mtree</b>()
<b>archive_write_set_format_mtree_classic</b>()
<b>archive_write_set_format_pax</b>()
<b>archive_write_set_format_pax_restricted</b>()
<b>archive_write_set_format_raw</b>()
<b>archive_write_set_format_shar</b>()
<b>archive_write_set_format_shar_dump</b>()
<b>archive_write_set_format_ustar</b>()
<b>archive_write_set_format_v7tar</b>()
<b>archive_write_set_format_warc</b>()
<b>archive_write_set_format_xar</b>()
<b>archive_write_set_format_zip</b>()</p>

<p style="margin-left:17%;">Set the format as specified.
More details on the formats supported by libarchive can be
found in the libarchive-formats(5) manual page.</p>

<p style="margin-top: 1em"><b>RETURN VALUES</b></p>

<p style="margin-left:6%;">These functions return
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>

<p style="margin-top: 1em"><b>ERRORS</b></p>

<p style="margin-left:6%;">Detailed error codes and textual
descriptions are available from the <b>archive_errno</b>()
and <b>archive_error_string</b>() functions.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:6%;">tar(1), libarchive(3),
archive_write(3), archive_write_set_options(3), cpio(5),
libarchive-formats(5), mtree(5), tar(5)</p>

<p style="margin-left:6%; margin-top: 1em">BSD
February&nbsp;14, 2013 BSD</p>
<hr>
</body>
</html>