1ARCHIVE_WRITE_FORMAT(3) BSD Library Functions Manual ARCHIVE_WRITE_FORMAT(3)
2
4 archive_write_set_format, archive_write_set_format_7zip,
5 archive_write_set_format_ar, archive_write_set_format_ar_bsd,
6 archive_write_set_format_ar_svr4, archive_write_set_format_by_name,
7 archive_write_set_format_cpio, archive_write_set_format_cpio_bin,
8 archive_write_set_format_cpio_newc, archive_write_set_format_cpio_odc,
9 archive_write_set_format_cpio_pwb,
10 archive_write_set_format_filter_by_ext,
11 archive_write_set_format_filter_by_ext_def,
12 archive_write_set_format_gnutar, archive_write_set_format_iso9660,
13 archive_write_set_format_mtree, archive_write_set_format_mtree_classic,
14 archive_write_set_format_mtree_default, archive_write_set_format_pax,
15 archive_write_set_format_pax_restricted, archive_write_set_format_raw,
16 archive_write_set_format_shar, archive_write_set_format_shar_dump,
17 archive_write_set_format_ustar, archive_write_set_format_v7tar,
18 archive_write_set_format_warc, archive_write_set_format_xar,
19 archive_write_set_format_zip — functions for creating archives
20
22 Streaming Archive Library (libarchive, -larchive)
23
25 #include <archive.h>
26
27 int
28 archive_write_set_format(struct archive *, int code);
29
30 int
31 archive_write_set_format_7zip(struct archive *);
32
33 int
34 archive_write_set_format_ar(struct archive *);
35
36 int
37 archive_write_set_format_ar_bsd(struct archive *);
38
39 int
40 archive_write_set_format_ar_svr4(struct archive *);
41
42 int
43 archive_write_set_format_by_name(struct archive *, const char *name);
44
45 int
46 archive_write_set_format_cpio(struct archive *);
47
48 int
49 archive_write_set_format_cpio_bin(struct archive *);
50
51 int
52 archive_write_set_format_cpio_newc(struct archive *);
53
54 int
55 archive_write_set_format_cpio_odc(struct archive *);
56
57 int
58 archive_write_set_format_cpio_pwb(struct archive *);
59
60 int
61 archive_write_set_format_filter_by_ext(struct archive *,
62 const char *filename);
63
64 int
65 archive_write_set_format_filter_by_ext_def(struct archive *,
66 const char *filename, const char *def_ext);
67
68 int
69 archive_write_set_format_gnutar(struct archive *);
70
71 int
72 archive_write_set_format_iso9660(struct archive *);
73
74 int
75 archive_write_set_format_mtree(struct archive *);
76
77 int
78 archive_write_set_format_pax(struct archive *);
79
80 int
81 archive_write_set_format_pax_restricted(struct archive *);
82
83 int
84 archive_write_set_format_raw(struct archive *);
85
86 int
87 archive_write_set_format_shar(struct archive *);
88
89 int
90 archive_write_set_format_shar_dump(struct archive *);
91
92 int
93 archive_write_set_format_ustar(struct archive *);
94
95 int
96 archive_write_set_format_v7tar(struct archive *);
97
98 int
99 archive_write_set_format_warc(struct archive *);
100
101 int
102 archive_write_set_format_xar(struct archive *);
103
104 int
105 archive_write_set_format_zip(struct archive *);
106
108 These functions set the format that will be used for the archive.
109
110 The library can write a variety of common archive formats.
111
112 archive_write_set_format()
113 Sets the format based on the format code (see archive.h for the
114 full list of format codes). In particular, this can be used in
115 conjunction with archive_format() to create a new archive with
116 the same format as an existing archive.
117
118 archive_write_set_format_by_name()
119 Sets the corresponding format based on the common name.
120
121 archive_write_set_format_filter_by_ext()
122 archive_write_set_format_filter_by_ext_def()
123 Sets both filters and format based on the output filename. Sup‐
124 ported extensions: .7z, .zip, .jar, .cpio, .iso, .a, .ar, .tar,
125 .tgz, .tar.gz, .tar.bz2, .tar.xz
126
127 archive_write_set_format_7zip() archive_write_set_format_ar_bsd()
128 archive_write_set_format_ar_svr4()
129 archive_write_set_format_cpio()
130 archive_write_set_format_cpio_bin()
131 archive_write_set_format_cpio_newc()
132 archive_write_set_format_cpio_odc()
133 archive_write_set_format_cpio_pwb()
134 archive_write_set_format_gnutar()
135 archive_write_set_format_iso9660()
136 archive_write_set_format_mtree()
137 archive_write_set_format_mtree_classic()
138 archive_write_set_format_pax()
139 archive_write_set_format_pax_restricted()
140 archive_write_set_format_raw() archive_write_set_format_shar()
141 archive_write_set_format_shar_dump()
142 archive_write_set_format_ustar() archive_write_set_format_v7tar()
143 archive_write_set_format_warc() archive_write_set_format_xar()
144 archive_write_set_format_zip()
145 Set the format as specified. More details on the formats sup‐
146 ported by libarchive can be found in the libarchive-formats(5)
147 manual page.
148
150 These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL.
151
153 Detailed error codes and textual descriptions are available from the
154 archive_errno() and archive_error_string() functions.
155
157 tar(1), archive_write(3), archive_write_set_options(3), libarchive(3),
158 cpio(5), libarchive-formats(5), mtree(5), tar(5)
159
160BSD February 14, 2013 BSD