|
Packit Service |
1d0348 |
.TH ARCHIVE_READ_EXTRACT 3 "February 2, 2012" ""
|
|
Packit Service |
1d0348 |
.SH NAME
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract\fP,
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract2\fP,
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract_set_progress_callback\fP
|
|
Packit Service |
1d0348 |
\- functions for reading streaming 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 |
\fIint\fP
|
|
Packit Service |
1d0348 |
.br
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract\fP(\fI\%struct\ archive\ *\fP, \fI\%struct\ archive_entry\ *\fP, \fI\%int\ flags\fP);
|
|
Packit Service |
1d0348 |
.br
|
|
Packit Service |
1d0348 |
\fIint\fP
|
|
Packit Service |
1d0348 |
.br
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract2\fP(\fI\%struct\ archive\ *src\fP, \fI\%struct\ archive_entry\ *\fP, \fI\%struct\ archive\ *dest\fP);
|
|
Packit Service |
1d0348 |
.br
|
|
Packit Service |
1d0348 |
\fIvoid\fP
|
|
Packit Service |
1d0348 |
.br
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract_set_progress_callback\fP(\fI\%struct\ archive\ *\fP, \fI\%void\ (*func)(void\ *)\fP, \fI\%void\ *user_data\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_read_extract\fP(), \fB\%archive_read_extract_set_skip_file\fP()
|
|
Packit Service |
1d0348 |
A convenience function that wraps the corresponding
|
|
Packit Service |
1d0348 |
\fBarchive_write_disk\fP(3)
|
|
Packit Service |
1d0348 |
interfaces.
|
|
Packit Service |
1d0348 |
The first call to
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract\fP()
|
|
Packit Service |
1d0348 |
creates a restore object using
|
|
Packit Service |
1d0348 |
\fBarchive_write_disk_new\fP(3)
|
|
Packit Service |
1d0348 |
and
|
|
Packit Service |
1d0348 |
\fBarchive_write_disk_set_standard_lookup\fP(3),
|
|
Packit Service |
1d0348 |
then transparently invokes
|
|
Packit Service |
1d0348 |
\fBarchive_write_disk_set_options\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_write_header\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_write_data\fP(3),
|
|
Packit Service |
1d0348 |
and
|
|
Packit Service |
1d0348 |
\fBarchive_write_finish_entry\fP(3)
|
|
Packit Service |
1d0348 |
to create the entry on disk and copy data into it.
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
\fIflags\fP
|
|
Packit Service |
1d0348 |
argument is passed unmodified to
|
|
Packit Service |
1d0348 |
\fBarchive_write_disk_set_options\fP(3).
|
|
Packit Service |
1d0348 |
.TP
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract2\fP()
|
|
Packit Service |
1d0348 |
This is another version of
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract\fP()
|
|
Packit Service |
1d0348 |
that allows you to provide your own restore object.
|
|
Packit Service |
1d0348 |
In particular, this allows you to override the standard lookup functions
|
|
Packit Service |
1d0348 |
using
|
|
Packit Service |
1d0348 |
\fBarchive_write_disk_set_group_lookup\fP(3),
|
|
Packit Service |
1d0348 |
and
|
|
Packit Service |
1d0348 |
\fBarchive_write_disk_set_user_lookup\fP(3).
|
|
Packit Service |
1d0348 |
Note that
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract2\fP()
|
|
Packit Service |
1d0348 |
does not accept a
|
|
Packit Service |
1d0348 |
\fIflags\fP
|
|
Packit Service |
1d0348 |
argument; you should use
|
|
Packit Service |
1d0348 |
\fB\%archive_write_disk_set_options\fP()
|
|
Packit Service |
1d0348 |
to set the restore options yourself.
|
|
Packit Service |
1d0348 |
.TP
|
|
Packit Service |
1d0348 |
\fB\%archive_read_extract_set_progress_callback\fP()
|
|
Packit Service |
1d0348 |
Sets a pointer to a user-defined callback that can be used
|
|
Packit Service |
1d0348 |
for updating progress displays during extraction.
|
|
Packit Service |
1d0348 |
The progress function will be invoked during the extraction of large
|
|
Packit Service |
1d0348 |
regular files.
|
|
Packit Service |
1d0348 |
The progress function will be invoked with the pointer provided to this call.
|
|
Packit Service |
1d0348 |
Generally, the data pointed to should include a reference to the archive
|
|
Packit Service |
1d0348 |
object and the archive_entry object so that various statistics
|
|
Packit Service |
1d0348 |
can be retrieved for the progress display.
|
|
Packit Service |
1d0348 |
.RE
|
|
Packit Service |
1d0348 |
.SH RETURN VALUES
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
Most functions return zero on success, non-zero on error.
|
|
Packit Service |
1d0348 |
The possible return codes include:
|
|
Packit Service |
1d0348 |
\fBARCHIVE_OK\fP
|
|
Packit Service |
1d0348 |
(the operation succeeded),
|
|
Packit Service |
1d0348 |
\fBARCHIVE_WARN\fP
|
|
Packit Service |
1d0348 |
(the operation succeeded but a non-critical error was encountered),
|
|
Packit Service |
1d0348 |
\fBARCHIVE_EOF\fP
|
|
Packit Service |
1d0348 |
(end-of-archive was encountered),
|
|
Packit Service |
1d0348 |
\fBARCHIVE_RETRY\fP
|
|
Packit Service |
1d0348 |
(the operation failed but can be retried),
|
|
Packit Service |
1d0348 |
and
|
|
Packit Service |
1d0348 |
\fBARCHIVE_FATAL\fP
|
|
Packit Service |
1d0348 |
(there was a fatal error; the archive should be closed immediately).
|
|
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 SEE ALSO
|
|
Packit Service |
1d0348 |
.ad l
|
|
Packit Service |
1d0348 |
\fBtar\fP(1),
|
|
Packit Service |
1d0348 |
\fBlibarchive\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_read\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_read_data\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_read_filter\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_read_format\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_read_open\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_read_set_options\fP(3),
|
|
Packit Service |
1d0348 |
\fBarchive_util\fP(3),
|
|
Packit Service |
1d0348 |
\fBtar\fP(5)
|