|
Packit Service |
1d0348 |
ARCHIVE_READ_EXTRACT(3) BSD Library Functions Manual ARCHIVE_READ_EXTRACT(3)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
NAME
|
|
Packit Service |
1d0348 |
archive_read_extract, archive_read_extract2,
|
|
Packit Service |
1d0348 |
archive_read_extract_set_progress_callback — functions for reading
|
|
Packit Service |
1d0348 |
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 |
int
|
|
Packit Service |
1d0348 |
archive_read_extract(struct archive *, struct archive_entry *,
|
|
Packit Service |
1d0348 |
int flags);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
int
|
|
Packit Service |
1d0348 |
archive_read_extract2(struct archive *src, struct archive_entry *,
|
|
Packit Service |
1d0348 |
struct archive *dest);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
void
|
|
Packit Service |
1d0348 |
archive_read_extract_set_progress_callback(struct archive *,
|
|
Packit Service |
1d0348 |
void (*func)(void *), void *user_data);
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
DESCRIPTION
|
|
Packit Service |
1d0348 |
archive_read_extract(), archive_read_extract_set_skip_file()
|
|
Packit Service |
1d0348 |
A convenience function that wraps the corresponding
|
|
Packit Service |
1d0348 |
archive_write_disk(3) interfaces. The first call to
|
|
Packit Service |
1d0348 |
archive_read_extract() creates a restore object using
|
|
Packit Service |
1d0348 |
archive_write_disk_new(3) and
|
|
Packit Service |
1d0348 |
archive_write_disk_set_standard_lookup(3), then transparently
|
|
Packit Service |
1d0348 |
invokes archive_write_disk_set_options(3),
|
|
Packit Service |
1d0348 |
archive_write_header(3), archive_write_data(3), and
|
|
Packit Service |
1d0348 |
archive_write_finish_entry(3) to create the entry on disk and
|
|
Packit Service |
1d0348 |
copy data into it. The flags argument is passed unmodified to
|
|
Packit Service |
1d0348 |
archive_write_disk_set_options(3).
|
|
Packit Service |
1d0348 |
archive_read_extract2()
|
|
Packit Service |
1d0348 |
This is another version of archive_read_extract() that allows you
|
|
Packit Service |
1d0348 |
to provide your own restore object. In particular, this allows
|
|
Packit Service |
1d0348 |
you to override the standard lookup functions using
|
|
Packit Service |
1d0348 |
archive_write_disk_set_group_lookup(3), and
|
|
Packit Service |
1d0348 |
archive_write_disk_set_user_lookup(3). Note that
|
|
Packit Service |
1d0348 |
archive_read_extract2() does not accept a flags argument; you
|
|
Packit Service |
1d0348 |
should use archive_write_disk_set_options() to set the restore
|
|
Packit Service |
1d0348 |
options yourself.
|
|
Packit Service |
1d0348 |
archive_read_extract_set_progress_callback()
|
|
Packit Service |
1d0348 |
Sets a pointer to a user-defined callback that can be used for
|
|
Packit Service |
1d0348 |
updating progress displays during extraction. The progress func‐
|
|
Packit Service |
1d0348 |
tion will be invoked during the extraction of large regular
|
|
Packit Service |
1d0348 |
files. The progress function will be invoked with the pointer
|
|
Packit Service |
1d0348 |
provided to this call. Generally, the data pointed to should
|
|
Packit Service |
1d0348 |
include a reference to the archive object and the archive_entry
|
|
Packit Service |
1d0348 |
object so that various statistics can be retrieved for the
|
|
Packit Service |
1d0348 |
progress display.
|
|
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 |
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_data(3),
|
|
Packit Service |
1d0348 |
archive_read_filter(3), archive_read_format(3), archive_read_open(3),
|
|
Packit Service |
1d0348 |
archive_read_set_options(3), archive_util(3), tar(5)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
BSD February 2, 2012 BSD
|