|
Packit Service |
1d0348 |
.TH ARCHIVE_WRITE_DATA 3 "February 28, 2017" ""
|
|
Packit Service |
1d0348 |
.SH NAME
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
\fB\%archive_write_data\fP,
|
|
Packit Service |
1d0348 |
\fB\%archive_write_data_block\fP
|
|
Packit Service |
1d0348 |
\- functions for creating archives
|
|
Packit Service |
1d0348 |
.SH LIBRARY
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
Streaming Archive Library (libarchive, -larchive)
|
|
Packit Service |
1d0348 |
.SH SYNOPSIS
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
\fB#include <archive.h>\fP
|
|
Packit Service |
1d0348 |
.br
|
|
Packit Service |
1d0348 |
\fIla_ssize_t\fP
|
|
Packit Service |
1d0348 |
.br
|
|
Packit Service |
1d0348 |
\fB\%archive_write_data\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ void\ *\fP, \fI\%size_t\fP);
|
|
Packit Service |
1d0348 |
.br
|
|
Packit Service |
1d0348 |
\fIla_ssize_t\fP
|
|
Packit Service |
1d0348 |
.br
|
|
Packit Service |
1d0348 |
\fB\%archive_write_data_block\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ void\ *\fP, \fI\%size_t\ size\fP, \fI\%int64_t\ offset\fP);
|
|
Packit Service |
1d0348 |
.SH DESCRIPTION
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
.RS 5
|
|
Packit Service |
1d0348 |
.TP
|
|
Packit Service |
1d0348 |
\fB\%archive_write_data\fP()
|
|
Packit Service |
1d0348 |
Write data corresponding to the header just written.
|
|
Packit Service |
1d0348 |
.TP
|
|
Packit Service |
1d0348 |
\fB\%archive_write_data_block\fP()
|
|
Packit Service |
1d0348 |
Write data corresponding to the header just written.
|
|
Packit Service |
1d0348 |
This is like
|
|
Packit Service |
1d0348 |
\fB\%archive_write_data\fP()
|
|
Packit Service |
1d0348 |
except that it performs a seek on the file being
|
|
Packit Service |
1d0348 |
written to the specified offset before writing the data.
|
|
Packit Service |
1d0348 |
This is useful when restoring sparse files from archive
|
|
Packit Service |
1d0348 |
formats that support sparse files.
|
|
Packit Service |
1d0348 |
Returns number of bytes written or -1 on error.
|
|
Packit Service |
1d0348 |
(Note: This is currently not supported for
|
|
Packit Service |
1d0348 |
Tn archive_write
|
|
Packit Service |
1d0348 |
handles, only for
|
|
Packit Service |
1d0348 |
Tn archive_write_disk
|
|
Packit Service |
1d0348 |
handles.
|
|
Packit Service |
1d0348 |
.RE
|
|
Packit Service |
1d0348 |
.SH RETURN VALUES
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
This function returns the number of bytes actually written, or
|
|
Packit Service |
1d0348 |
a negative error code on error.
|
|
Packit Service |
1d0348 |
.SH ERRORS
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
Detailed error codes and textual descriptions are available from the
|
|
Packit Service |
1d0348 |
\fB\%archive_errno\fP()
|
|
Packit Service |
1d0348 |
and
|
|
Packit Service |
1d0348 |
\fB\%archive_error_string\fP()
|
|
Packit Service |
1d0348 |
functions.
|
|
Packit Service |
1d0348 |
.SH BUGS
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
In libarchive 3.x, this function sometimes returns
|
|
Packit Service |
1d0348 |
zero on success instead of returning the number of bytes written.
|
|
Packit Service |
1d0348 |
Specifically, this occurs when writing to an
|
|
Packit Service |
1d0348 |
Vt archive_write_disk
|
|
Packit Service |
1d0348 |
handle.
|
|
Packit Service |
1d0348 |
Clients should treat any value less than zero as an error
|
|
Packit Service |
1d0348 |
and consider any non-negative value as success.
|
|
Packit Service |
1d0348 |
.SH SEE ALSO
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
\fBtar\fP(1),
|
|
Packit Service |
1d0348 |
\fBlibarchive\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_write_finish_entry\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_write_set_options\fP(3),
|
|
Packit Service |
1d0348 |
\fBcpio\fP(5),
|
|
Packit Service |
1d0348 |
\fBmtree\fP(5),
|
|
Packit Service |
1d0348 |
\fBtar\fP(5)
|