summaryrefslogtreecommitdiff
path: root/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFormat3.wiki
blob: 60fa69c54b6cfdac48517f42d40f0cce94ee1335 (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
ARCHIVE_WRITE_FORMAT(3) manual page 
== NAME == 
'''archive_write_set_format''', 
'''archive_write_set_format_7zip''', 
'''archive_write_set_format_ar''', 
'''archive_write_set_format_ar_bsd''', 
'''archive_write_set_format_ar_svr4''', 
'''archive_write_set_format_by_name''', 
'''archive_write_set_format_cpio''', 
'''archive_write_set_format_cpio_newc''', 
'''archive_write_set_format_filter_by_ext''', 
'''archive_write_set_format_filter_by_ext_def''', 
'''archive_write_set_format_gnutar''', 
'''archive_write_set_format_iso9660''', 
'''archive_write_set_format_mtree''', 
'''archive_write_set_format_mtree_classic''', 
'''archive_write_set_format_mtree_default''', 
'''archive_write_set_format_pax''', 
'''archive_write_set_format_pax_restricted''', 
'''archive_write_set_format_raw''', 
'''archive_write_set_format_shar''', 
'''archive_write_set_format_shar_dump''', 
'''archive_write_set_format_ustar''', 
'''archive_write_set_format_v7tar''', 
'''archive_write_set_format_warc''', 
'''archive_write_set_format_xar''', 
'''archive_write_set_format_zip''', 
- functions for creating archives 
== LIBRARY == 
Streaming Archive Library (libarchive, -larchive) 
== SYNOPSIS == 
'''<nowiki>#include <archive.h></nowiki>''' 
<br> 
''int'' 
<br> 
'''archive_write_set_format'''(''struct archive *'', ''int code''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_7zip'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_ar'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_ar_bsd'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_ar_svr4'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_by_name'''(''struct archive *'', ''const char *name''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_cpio'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_cpio_newc'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_filter_by_ext'''(''struct archive *'', ''const char *filename''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_filter_by_ext_def'''(''struct archive *'', ''const char *filename'', ''const char *def_ext''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_gnutar'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_iso9660'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_mtree'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_pax'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_pax_restricted'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_raw'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_shar'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_shar_dump'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_ustar'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_v7tar'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_warc'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_xar'''(''struct archive *''); 
<br> 
''int'' 
<br> 
'''archive_write_set_format_zip'''(''struct archive *''); 
== DESCRIPTION == 
These functions set the format that will be used for the archive. 

The library can write a variety of common archive formats. 
<dl> 
<dt>'''archive_write_set_format'''()</dt><dd> 
Sets the format based on the format code (see 
''archive.h'' 
for the full list of format codes). 
In particular, this can be used in conjunction with 
'''archive_format'''() 
to create a new archive with the same format as an existing archive. 
</dd><dt>'''archive_write_set_format_by_name'''()</dt><dd> 
Sets the corresponding format based on the common name. 
</dd><dt> 
'''archive_write_set_format_filter_by_ext'''(), 
'''archive_write_set_format_filter_by_ext_def'''() 
</dt> <dd> 
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 
</dd><dt> 
'''archive_write_set_format_7zip'''() 
'''archive_write_set_format_ar_bsd'''(), 
'''archive_write_set_format_ar_svr4'''(), 
'''archive_write_set_format_cpio'''() 
'''archive_write_set_format_cpio_newc'''() 
'''archive_write_set_format_gnutar'''() 
'''archive_write_set_format_iso9660'''() 
'''archive_write_set_format_mtree'''() 
'''archive_write_set_format_mtree_classic'''() 
'''archive_write_set_format_pax'''() 
'''archive_write_set_format_pax_restricted'''() 
'''archive_write_set_format_raw'''() 
'''archive_write_set_format_shar'''() 
'''archive_write_set_format_shar_dump'''() 
'''archive_write_set_format_ustar'''() 
'''archive_write_set_format_v7tar'''() 
'''archive_write_set_format_warc'''() 
'''archive_write_set_format_xar'''() 
'''archive_write_set_format_zip'''() 
</dt> <dd> 
Set the format as specified. 
More details on the formats supported by libarchive can be found in the 
[[ManPageLibarchiveFormats5]] 
manual page. 
</dd></dl> 
== RETURN VALUES == 
These functions return 
'''ARCHIVE_OK''' 
on success, or 
'''ARCHIVE_FATAL'''. 
== ERRORS == 
Detailed error codes and textual descriptions are available from the 
'''archive_errno'''() 
and 
'''archive_error_string'''() 
functions. 
== SEE ALSO == 
[[ManPageBsdtar1]], 
[[ManPageLibarchive3]], 
[[ManPageArchiveWrite3]], 
[[ManPageArchiveWriteSetOptions3]], 
[[ManPageCpio5]], 
[[ManPageLibarchiveFormats5]], 
[[ManPageMtree5]], 
[[ManPageTar5]]