1ARCHIVE_WRITE_FORMAT(3)  BSD Library Functions Manual  ARCHIVE_WRITE_FORMAT(3)
2

NAME

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_newc,
8     archive_write_set_format_filter_by_ext,
9     archive_write_set_format_filter_by_ext_def,
10     archive_write_set_format_gnutar, archive_write_set_format_iso9660,
11     archive_write_set_format_mtree, archive_write_set_format_mtree_classic,
12     archive_write_set_format_mtree_default, archive_write_set_format_pax,
13     archive_write_set_format_pax_restricted, archive_write_set_format_raw,
14     archive_write_set_format_shar, archive_write_set_format_shar_dump,
15     archive_write_set_format_ustar, archive_write_set_format_v7tar,
16     archive_write_set_format_warc, archive_write_set_format_xar,
17     archive_write_set_format_zip — functions for creating archives
18

LIBRARY

20     Streaming Archive Library (libarchive, -larchive)
21

SYNOPSIS

23     #include <archive.h>
24
25     int
26     archive_write_set_format(struct archive *, int code);
27
28     int
29     archive_write_set_format_7zip(struct archive *);
30
31     int
32     archive_write_set_format_ar(struct archive *);
33
34     int
35     archive_write_set_format_ar_bsd(struct archive *);
36
37     int
38     archive_write_set_format_ar_svr4(struct archive *);
39
40     int
41     archive_write_set_format_by_name(struct archive *, const char *name);
42
43     int
44     archive_write_set_format_cpio(struct archive *);
45
46     int
47     archive_write_set_format_cpio_newc(struct archive *);
48
49     int
50     archive_write_set_format_filter_by_ext(struct archive *,
51         const char *filename);
52
53     int
54     archive_write_set_format_filter_by_ext_def(struct archive *,
55         const char *filename, const char *def_ext);
56
57     int
58     archive_write_set_format_gnutar(struct archive *);
59
60     int
61     archive_write_set_format_iso9660(struct archive *);
62
63     int
64     archive_write_set_format_mtree(struct archive *);
65
66     int
67     archive_write_set_format_pax(struct archive *);
68
69     int
70     archive_write_set_format_pax_restricted(struct archive *);
71
72     int
73     archive_write_set_format_raw(struct archive *);
74
75     int
76     archive_write_set_format_shar(struct archive *);
77
78     int
79     archive_write_set_format_shar_dump(struct archive *);
80
81     int
82     archive_write_set_format_ustar(struct archive *);
83
84     int
85     archive_write_set_format_v7tar(struct archive *);
86
87     int
88     archive_write_set_format_warc(struct archive *);
89
90     int
91     archive_write_set_format_xar(struct archive *);
92
93     int
94     archive_write_set_format_zip(struct archive *);
95

DESCRIPTION

97     These functions set the format that will be used for the archive.
98
99     The library can write a variety of common archive formats.
100
101     archive_write_set_format()
102             Sets the format based on the format code (see archive.h for the
103             full list of format codes).  In particular, this can be used in
104             conjunction with archive_format() to create a new archive with
105             the same format as an existing archive.
106
107     archive_write_set_format_by_name()
108             Sets the corresponding format based on the common name.
109
110     archive_write_set_format_filter_by_ext(),
111             archive_write_set_format_filter_by_ext_def()
112             Sets both filters and format based on the output filename.  Sup‐
113             ported extensions: .7z, .zip, .jar, .cpio, .iso, .a, .ar, .tar,
114             .tgz, .tar.gz, .tar.bz2, .tar.xz
115
116     archive_write_set_format_7zip() archive_write_set_format_ar_bsd(),
117             archive_write_set_format_ar_svr4(),
118             archive_write_set_format_cpio()
119             archive_write_set_format_cpio_newc()
120             archive_write_set_format_gnutar()
121             archive_write_set_format_iso9660()
122             archive_write_set_format_mtree()
123             archive_write_set_format_mtree_classic()
124             archive_write_set_format_pax()
125             archive_write_set_format_pax_restricted()
126             archive_write_set_format_raw() archive_write_set_format_shar()
127             archive_write_set_format_shar_dump()
128             archive_write_set_format_ustar() archive_write_set_format_v7tar()
129             archive_write_set_format_warc() archive_write_set_format_xar()
130             archive_write_set_format_zip()
131             Set the format as specified.  More details on the formats sup‐
132             ported by libarchive can be found in the libarchive-formats(5)
133             manual page.
134

RETURN VALUES

136     These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL.
137

ERRORS

139     Detailed error codes and textual descriptions are available from the
140     archive_errno() and archive_error_string() functions.
141

SEE ALSO

143     tar(1), archive_write(3), archive_write_set_options(3), libarchive(3),
144     cpio(5), libarchive-formats(5), mtree(5), tar(5)
145
146BSD                            February 14, 2013                           BSD
Impressum