Imported Upstream version 3.4.1
[platform/upstream/libarchive.git] / doc / man / archive_write_free.3
1 .TH ARCHIVE_WRITE_FREE 3 "February 2, 2012" ""
2 .SH NAME
3 .ad l
4 \fB\%archive_write_fail\fP,
5 \fB\%archive_write_close\fP,
6 \fB\%archive_write_finish\fP,
7 \fB\%archive_write_free\fP
8 \- functions for creating archives
9 .SH LIBRARY
10 .ad l
11 Streaming Archive Library (libarchive, -larchive)
12 .SH SYNOPSIS
13 .ad l
14 \fB#include <archive.h>\fP
15 .br
16 \fIint\fP
17 .br
18 \fB\%archive_write_fail\fP(\fI\%struct\ archive\ *\fP);
19 .br
20 \fIint\fP
21 .br
22 \fB\%archive_write_close\fP(\fI\%struct\ archive\ *\fP);
23 .br
24 \fIint\fP
25 .br
26 \fB\%archive_write_finish\fP(\fI\%struct\ archive\ *\fP);
27 .br
28 \fIint\fP
29 .br
30 \fB\%archive_write_free\fP(\fI\%struct\ archive\ *\fP);
31 .SH DESCRIPTION
32 .ad l
33 .RS 5
34 .TP
35 \fB\%archive_write_fail\fP()
36 Always returns
37 \fBARCHIVE_FATAL\fP.
38 This marks the archive object as being unusable;
39 after calling this function, the only call that can succeed is
40 \fB\%archive_write_free\fP()
41 to release the resources.
42 This can be used to speed recovery when the archive creation
43 must be aborted.
44 Note that the created archive is likely to be malformed in this case;
45 .TP
46 \fB\%archive_write_close\fP()
47 Complete the archive and invoke the close callback.
48 .TP
49 \fB\%archive_write_finish\fP()
50 This is a deprecated synonym for
51 \fB\%archive_write_free\fP().
52 .TP
53 \fB\%archive_write_free\fP()
54 Invokes
55 \fB\%archive_write_close\fP()
56 if necessary, then releases all resources.
57 If you need detailed information about
58 \fB\%archive_write_close\fP()
59 failures, you should be careful to call it separately, as
60 you cannot obtain error information after
61 \fB\%archive_write_free\fP()
62 returns.
63 .RE
64 .SH RETURN VALUES
65 .ad l
66 These functions return
67 \fBARCHIVE_OK\fP
68 on success, or
69 \fBARCHIVE_FATAL\fP.
70 .SH ERRORS
71 .ad l
72 Detailed error codes and textual descriptions are available from the
73 \fB\%archive_errno\fP()
74 and
75 \fB\%archive_error_string\fP()
76 functions.
77 .SH SEE ALSO
78 .ad l
79 \fBtar\fP(1),
80 \fBarchive_write_set_options\fP(3),
81 \fBlibarchive\fP(3),
82 \fBcpio\fP(5),
83 \fBmtree\fP(5),
84 \fBtar\fP(5)