Imported Upstream version 3.3.0
[platform/upstream/libarchive.git] / doc / wiki / ManPageArchiveWriteData3.wiki
1 ARCHIVE_WRITE_DATA(3) manual page 
2 == NAME == 
3 '''archive_write_data''' 
4 - functions for creating archives 
5 == LIBRARY == 
6 Streaming Archive Library (libarchive, -larchive) 
7 == SYNOPSIS == 
8 '''<nowiki>#include <archive.h></nowiki>''' 
9 <br> 
10 ''la_ssize_t'' 
11 <br> 
12 '''archive_write_data'''(''struct archive *'', ''const void *'', ''size_t''); 
13 == DESCRIPTION == 
14 Write data corresponding to the header just written. 
15 == RETURN VALUES == 
16 This function returns the number of bytes actually written, or 
17 a negative error code on error. 
18 == ERRORS == 
19 Detailed error codes and textual descriptions are available from the 
20 '''archive_errno'''() 
21 and 
22 '''archive_error_string'''() 
23 functions. 
24 == BUGS == 
25 In libarchive 3.x, this function sometimes returns 
26 zero on success instead of returning the number of bytes written. 
27 Specifically, this occurs when writing to an 
28 ''archive_write_disk'' 
29 handle. 
30 Clients should treat any value less than zero as an error 
31 and consider any non-negative value as success. 
32 == SEE ALSO == 
33 [[ManPageBsdtar1]], 
34 [[ManPageibarchive3]], 
35 [[ManPagerchiveriteinishntry3]], 
36 [[ManPagerchiveriteetptions3]], 
37 [[ManPageCpio5]], 
38 [[ManPageMtree5]], 
39 [[ManPageTar5]]