8be96f5906fc7b58bce83c7de077fa0a28f33794
[platform/upstream/libarchive.git] / doc / html / archive_write_data.3.html
1 <!-- Creator     : groff version 1.22.3 -->
2 <!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
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_DATA(3) BSD Library Functions Manual
24 ARCHIVE_WRITE_DATA(3)</p>
25
26 <p style="margin-top: 1em"><b>NAME</b></p>
27
28 <p style="margin-left:6%;"><b>archive_write_data</b>
29 &mdash; functions for creating archives</p>
30
31 <p style="margin-top: 1em"><b>LIBRARY</b></p>
32
33 <p style="margin-left:6%;">Streaming Archive Library
34 (libarchive, -larchive)</p>
35
36 <p style="margin-top: 1em"><b>SYNOPSIS</b></p>
37
38 <p style="margin-left:6%;"><b>#include
39 &lt;archive.h&gt;</b></p>
40
41
42 <p style="margin-left:6%; margin-top: 1em"><i>la_ssize_t</i></p>
43
44
45 <p style="margin-left:12%;"><b>archive_write_data</b>(<i>struct&nbsp;archive&nbsp;*</i>,
46 <i>const&nbsp;void&nbsp;*</i>, <i>size_t</i>);</p>
47
48 <p style="margin-top: 1em"><b>DESCRIPTION</b></p>
49
50 <p style="margin-left:6%;">Write data corresponding to the
51 header just written.</p>
52
53 <p style="margin-top: 1em"><b>RETURN VALUES</b></p>
54
55 <p style="margin-left:6%;">This function returns the number
56 of bytes actually written, or a negative error code on
57 error.</p>
58
59 <p style="margin-top: 1em"><b>ERRORS</b></p>
60
61 <p style="margin-left:6%;">Detailed error codes and textual
62 descriptions are available from the <b>archive_errno</b>()
63 and <b>archive_error_string</b>() functions.</p>
64
65 <p style="margin-top: 1em"><b>BUGS</b></p>
66
67 <p style="margin-left:6%;">In libarchive 3.x, this function
68 sometimes returns zero on success instead of returning the
69 number of bytes written. Specifically, this occurs when
70 writing to an <i>archive_write_disk</i> handle. Clients
71 should treat any value less than zero as an error and
72 consider any non-negative value as success.</p>
73
74 <p style="margin-top: 1em"><b>SEE ALSO</b></p>
75
76 <p style="margin-left:6%;">tar(1), libarchive(3),
77 archive_write_finish_entry(3), archive_write_set_options(3),
78 cpio(5), mtree(5), tar(5)</p>
79
80 <p style="margin-left:6%; margin-top: 1em">BSD
81 February&nbsp;2, 2012 BSD</p>
82 <hr>
83 </body>
84 </html>