archive_write_data - functions for creating archives
#include <archive.h> la_ssize_t archive_write_data(struct archive *, const void *, size_t); la_ssize_t archive_write_data_block(struct archive *, const void *, size_t size, int64_t offset);
ARCHIVE_WRITE_DATA(3archive)
NAME
archive_write_data, archive_write_data_block - functions for creating
archives
LIBRARY
Streaming Archive Library (libarchive, -larchive)
SYNOPSIS
#include <archive.h>
la_ssize_t
archive_write_data(struct archive *, const void *, size_t);
la_ssize_t
archive_write_data_block(struct archive *, const void *, size_t size,
int64_t offset);
DESCRIPTION
archive_write_data()
Write data corresponding to the header just written.
archive_write_data_block()
Write data corresponding to the header just written. This
is like archive_write_data() except that it performs a seek
on the file being written to the specified offset before
writing the data. This is useful when restoring sparse
files from archive formats that support sparse files.
Returns number of bytes written or -1 on error. (Note:
This is currently not supported for Tn archive_write han-
dles, only for Tn archive_write_disk handles.
RETURN VALUES
This function returns the number of bytes actually written, or a nega-
tive error code on error.
ERRORS
Detailed error codes and textual descriptions are available from the
archive_errno() and archive_error_string() functions.
BUGS
In libarchive 3.x, this function sometimes returns zero on success
instead of returning the number of bytes written. Specifically, this
occurs when writing to an Vt archive_write_disk handle. Clients should
treat any value less than zero as an error and consider any non-nega-
tive value as success.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
+---------------+--------------------+
|ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+---------------+--------------------+
|Availability | library/libarchive |
+---------------+--------------------+
|Stability | Uncommitted |
+---------------+--------------------+
SEE ALSO
tar(1), archive_write_finish_entry(3), archive_write_set_options(3),
libarchive(3), mtree(5)
NOTES
Source code for open source software components in Oracle Solaris can
be found at https://www.oracle.com/downloads/opensource/solaris-source-
code-downloads.html.
This software was built from source available at
https://github.com/oracle/solaris-userland. The original community
source was downloaded from
https://github.com/libarchive/libarchive/releases/down-
load/v3.6.1/libarchive-3.6.1.tar.gz.
Further information about this software can be found on the open source
community website at http://www.libarchive.org/.
February 28, 2017
ARCHIVE_WRITE_DATA(3archive)