|
Packit Service |
1d0348 |
ARCHIVE_READ_DATA(3) BSD Library Functions Manual ARCHIVE_READ_DATA(3)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
NAME
|
|
Packit Service |
1d0348 |
archive_read_data archive_read_data_block, archive_read_data_skip,
|
|
Packit Service |
1d0348 |
archive_read_data_into_fd — functions for reading streaming archives
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
LIBRARY
|
|
Packit Service |
1d0348 |
Streaming Archive Library (libarchive, -larchive)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
SYNOPSIS
|
|
Packit Service |
1d0348 |
#include <archive.h>
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
la_ssize_t
|
|
Packit Service |
1d0348 |
archive_read_data(struct archive *, void *buff, size_t len);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
int
|
|
Packit Service |
1d0348 |
archive_read_data_block(struct archive *, const void **buff, size_t *len,
|
|
Packit Service |
1d0348 |
off_t *offset);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
int
|
|
Packit Service |
1d0348 |
archive_read_data_skip(struct archive *);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
int
|
|
Packit Service |
1d0348 |
archive_read_data_into_fd(struct archive *, int fd);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
DESCRIPTION
|
|
Packit Service |
1d0348 |
archive_read_data()
|
|
Packit Service |
1d0348 |
Read data associated with the header just read. Internally, this
|
|
Packit Service |
1d0348 |
is a convenience function that calls archive_read_data_block()
|
|
Packit Service |
1d0348 |
and fills any gaps with nulls so that callers see a single con‐
|
|
Packit Service |
1d0348 |
tinuous stream of data.
|
|
Packit Service |
1d0348 |
archive_read_data_block()
|
|
Packit Service |
1d0348 |
Return the next available block of data for this entry. Unlike
|
|
Packit Service |
1d0348 |
archive_read_data(), the archive_read_data_block() function
|
|
Packit Service |
1d0348 |
avoids copying data and allows you to correctly handle sparse
|
|
Packit Service |
1d0348 |
files, as supported by some archive formats. The library guaran‐
|
|
Packit Service |
1d0348 |
tees that offsets will increase and that blocks will not overlap.
|
|
Packit Service |
1d0348 |
Note that the blocks returned from this function can be much
|
|
Packit Service |
1d0348 |
larger than the block size read from disk, due to compression and
|
|
Packit Service |
1d0348 |
internal buffer optimizations.
|
|
Packit Service |
1d0348 |
archive_read_data_skip()
|
|
Packit Service |
1d0348 |
A convenience function that repeatedly calls
|
|
Packit Service |
1d0348 |
archive_read_data_block() to skip all of the data for this ar‐
|
|
Packit Service |
1d0348 |
chive entry. Note that this function is invoked automatically by
|
|
Packit Service |
1d0348 |
archive_read_next_header2() if the previous entry was not com‐
|
|
Packit Service |
1d0348 |
pletely consumed.
|
|
Packit Service |
1d0348 |
archive_read_data_into_fd()
|
|
Packit Service |
1d0348 |
A convenience function that repeatedly calls
|
|
Packit Service |
1d0348 |
archive_read_data_block() to copy the entire entry to the pro‐
|
|
Packit Service |
1d0348 |
vided file descriptor.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
RETURN VALUES
|
|
Packit Service |
1d0348 |
Most functions return zero on success, non-zero on error. The possible
|
|
Packit Service |
1d0348 |
return codes include: ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN
|
|
Packit Service |
1d0348 |
(the operation succeeded but a non-critical error was encountered),
|
|
Packit Service |
1d0348 |
ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera‐
|
|
Packit Service |
1d0348 |
tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal
|
|
Packit Service |
1d0348 |
error; the archive should be closed immediately).
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_data() returns a count of bytes actually read or zero at the
|
|
Packit Service |
1d0348 |
end of the entry. On error, a value of ARCHIVE_FATAL, ARCHIVE_WARN, or
|
|
Packit Service |
1d0348 |
ARCHIVE_RETRY is returned.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ERRORS
|
|
Packit Service |
1d0348 |
Detailed error codes and textual descriptions are available from the
|
|
Packit Service |
1d0348 |
archive_errno() and archive_error_string() functions.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
SEE ALSO
|
|
Packit Service |
1d0348 |
tar(1), libarchive(3), archive_read(3), archive_read_extract(3),
|
|
Packit Service |
1d0348 |
archive_read_filter(3), archive_read_format(3), archive_read_header(3),
|
|
Packit Service |
1d0348 |
archive_read_open(3), archive_read_set_options(3), archive_util(3),
|
|
Packit Service |
1d0348 |
tar(5)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
BSD February 2, 2012 BSD
|