Blame doc/html/archive_read_extract.3.html

Packit Service 1d0348
Packit Service 1d0348
Packit Service 1d0348
Packit Service 1d0348
"http://www.w3.org/TR/html4/loose.dtd">
Packit Service 1d0348
<html>
Packit Service 1d0348
<head>
Packit Service 1d0348
<meta name="generator" content="groff -Thtml, see www.gnu.org">
Packit Service 1d0348
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
Packit Service 1d0348
<meta name="Content-Style" content="text/css">
Packit Service 1d0348
<style type="text/css">
Packit Service 1d0348
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
Packit Service 1d0348
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
Packit Service 1d0348
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
Packit Service 1d0348
       h1      { text-align: center }
Packit Service 1d0348
</style>
Packit Service 1d0348
<title></title>
Packit Service 1d0348
</head>
Packit Service 1d0348
<body>
Packit Service 1d0348
Packit Service 1d0348

Packit Service 1d0348
Packit Service 1d0348
Packit Service 1d0348

ARCHIVE_READ_EXTRACT(3) BSD Library Functions Manual

Packit Service 1d0348
ARCHIVE_READ_EXTRACT(3)

Packit Service 1d0348
Packit Service 1d0348

NAME

Packit Service 1d0348
Packit Service 1d0348

archive_read_extract,

Packit Service 1d0348
archive_read_extract2,
Packit Service 1d0348
archive_read_extract_set_progress_callback
Packit Service 1d0348
functions for reading streaming archives

Packit Service 1d0348
Packit Service 1d0348

LIBRARY

Packit Service 1d0348
Packit Service 1d0348

Streaming Archive Library

Packit Service 1d0348
(libarchive, -larchive)

Packit Service 1d0348
Packit Service 1d0348

SYNOPSIS

Packit Service 1d0348
Packit Service 1d0348

#include

Packit Service 1d0348
<archive.h>

Packit Service 1d0348
Packit Service 1d0348

int

Packit Service 1d0348
Packit Service 1d0348
Packit Service 1d0348

archive_read_extract(struct archive *,

Packit Service 1d0348
struct archive_entry *,
Packit Service 1d0348
int flags);

Packit Service 1d0348
Packit Service 1d0348

int

Packit Service 1d0348
Packit Service 1d0348
Packit Service 1d0348

archive_read_extract2(struct archive *src,

Packit Service 1d0348
struct archive_entry *,
Packit Service 1d0348
struct archive *dest);

Packit Service 1d0348
Packit Service 1d0348

void

Packit Service 1d0348
Packit Service 1d0348
Packit Service 1d0348

archive_read_extract_set_progress_callback(struct archive *,

Packit Service 1d0348
void (*func)(void *),
Packit Service 1d0348
void *user_data);

Packit Service 1d0348
Packit Service 1d0348

DESCRIPTION

Packit Service 1d0348
archive_read_extract(),
Packit Service 1d0348
archive_read_extract_set_skip_file()

Packit Service 1d0348
Packit Service 1d0348

A convenience function that

Packit Service 1d0348
wraps the corresponding archive_write_disk(3) interfaces.
Packit Service 1d0348
The first call to archive_read_extract() creates a
Packit Service 1d0348
restore object using archive_write_disk_new(3) and
Packit Service 1d0348
archive_write_disk_set_standard_lookup(3), then
Packit Service 1d0348
transparently 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
Packit Service 1d0348
and copy data into it. The flags argument is passed
Packit Service 1d0348
unmodified to archive_write_disk_set_options(3).

Packit Service 1d0348
Packit Service 1d0348

archive_read_extract2()

Packit Service 1d0348
Packit Service 1d0348

This is another version of

Packit Service 1d0348
archive_read_extract() that allows you to provide
Packit Service 1d0348
your own restore object. In particular, this allows you to
Packit Service 1d0348
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
Packit Service 1d0348
flags argument; you should use
Packit Service 1d0348
archive_write_disk_set_options() to set the restore
Packit Service 1d0348
options yourself.

Packit Service 1d0348
Packit Service 1d0348

archive_read_extract_set_progress_callback()

Packit Service 1d0348
Packit Service 1d0348

Sets a pointer to a

Packit Service 1d0348
user-defined callback that can be used for updating progress
Packit Service 1d0348
displays during extraction. The progress function will be
Packit Service 1d0348
invoked during the extraction of large regular files. The
Packit Service 1d0348
progress function will be invoked with the pointer provided
Packit Service 1d0348
to this call. Generally, the data pointed to should include
Packit Service 1d0348
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
Packit Service 1d0348

Most functions return zero on

Packit Service 1d0348
success, non-zero on error. The possible return codes
Packit Service 1d0348
include: ARCHIVE_OK (the operation succeeded),
Packit Service 1d0348
ARCHIVE_WARN (the operation succeeded but a
Packit Service 1d0348
non-critical error was encountered), ARCHIVE_EOF
Packit Service 1d0348
(end-of-archive was encountered), ARCHIVE_RETRY (the
Packit Service 1d0348
operation failed but can be retried), and
Packit Service 1d0348
ARCHIVE_FATAL (there was a fatal error; the archive
Packit Service 1d0348
should be closed immediately).

Packit Service 1d0348
Packit Service 1d0348

ERRORS

Packit Service 1d0348
Packit Service 1d0348

Detailed error codes and textual

Packit Service 1d0348
descriptions are available from the archive_errno()
Packit Service 1d0348
and archive_error_string() functions.

Packit Service 1d0348
Packit Service 1d0348

SEE ALSO

Packit Service 1d0348
Packit Service 1d0348

tar(1), libarchive(3),

Packit Service 1d0348
archive_read(3), archive_read_data(3),
Packit Service 1d0348
archive_read_filter(3), archive_read_format(3),
Packit Service 1d0348
archive_read_open(3), archive_read_set_options(3),
Packit Service 1d0348
archive_util(3), tar(5)

Packit Service 1d0348
Packit Service 1d0348

BSD

Packit Service 1d0348
February 2, 2012 BSD

Packit Service 1d0348

Packit Service 1d0348
</body>
Packit Service 1d0348
</html>