File: archive_read_extract.3.html

package info (click to toggle)
libarchive 3.8.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,896 kB
  • sloc: ansic: 172,236; sh: 6,022; makefile: 1,951; cpp: 1,535; awk: 770
file content (137 lines) | stat: -rw-r--r-- 4,855 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!-- Creator     : groff version 1.23.0 -->
<!-- CreationDate: Mon Jan  5 10:42:44 2026 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p><i>ARCHIVE_READ_EXTRACT</i>(3) Library Functions Manual
<i>ARCHIVE_READ_EXTRACT</i>(3)</p>

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:9%;">archive_read_extract,
archive_read_extract2,
archive_read_extract_set_progress_callback &mdash; functions
for reading streaming archives</p>

<p style="margin-top: 1em"><b>LIBRARY</b></p>

<p style="margin-left:9%;">Streaming Archive Library
(libarchive, -larchive)</p>

<p style="margin-top: 1em"><b>SYNOPSIS</b></p>

<p style="margin-left:9%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_extract</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>int&nbsp;flags</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_extract2</b>(<i>struct&nbsp;archive&nbsp;*src</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>,
<i>struct&nbsp;archive&nbsp;*dest</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>void</i></p>


<p><b>archive_read_extract_set_progress_callback</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;(*func)(void&nbsp;*)</i>,
<i>void&nbsp;*user_data</i>);</p>

<p style="margin-top: 1em"><b>DESCRIPTION <br>
archive_read_extract</b>(),
<b>archive_read_extract_set_skip_file</b>()</p>

<p style="margin-left:19%;">A convenience function that
wraps the corresponding <i>archive_write_disk</i>(3)
interfaces. The first call to <b>archive_read_extract</b>()
creates a restore object using
<i>archive_write_disk_new</i>(3) and
<i>archive_write_disk_set_standard_lookup</i>(3), then
transparently invokes
<i>archive_write_disk_set_options</i>(3),
<i>archive_write_header</i>(3),
<i>archive_write_data</i>(3), and
<i>archive_write_finish_entry</i>(3) to create the entry on
disk and copy data into it. The <i>flags</i> argument is
passed unmodified to
<i>archive_write_disk_set_options</i>(3).</p>

<p><b>archive_read_extract2</b>()</p>

<p style="margin-left:19%;">This is another version of
<b>archive_read_extract</b>() that allows you to provide
your own restore object. In particular, this allows you to
override the standard lookup functions using
<i>archive_write_disk_set_group_lookup</i>(3), and
<i>archive_write_disk_set_user_lookup</i>(3). Note that
<b>archive_read_extract2</b>() does not accept a
<i>flags</i> argument; you should use
<b>archive_write_disk_set_options</b>() to set the restore
options yourself.</p>

<p><b>archive_read_extract_set_progress_callback</b>()</p>

<p style="margin-left:19%;">Sets a pointer to a
user-defined callback that can be used for updating progress
displays during extraction. The progress function will be
invoked during the extraction of large regular files. The
progress function will be invoked with the pointer provided
to this call. Generally, the data pointed to should include
a reference to the archive object and the archive_entry
object so that various statistics can be retrieved for the
progress display.</p>

<p style="margin-top: 1em"><b>RETURN VALUES</b></p>

<p style="margin-left:9%;">Most functions return zero on
success, non-zero on error. The possible return codes
include: <b>ARCHIVE_OK</b> (the operation succeeded),
<b>ARCHIVE_WARN</b> (the operation succeeded but a
non-critical error was encountered), <b>ARCHIVE_EOF</b>
(end-of-archive was encountered), <b>ARCHIVE_RETRY</b> (the
operation failed but can be retried), and
<b>ARCHIVE_FATAL</b> (there was a fatal error; the archive
should be closed immediately).</p>

<p style="margin-top: 1em"><b>ERRORS</b></p>

<p style="margin-left:9%;">Detailed error codes and textual
descriptions are available from the <b>archive_errno</b>()
and <b>archive_error_string</b>() functions.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:9%;"><i>tar</i>(1),
<i>archive_read</i>(3), <i>archive_read_data</i>(3),
<i>archive_read_filter</i>(3),
<i>archive_read_format</i>(3), <i>archive_read_open</i>(3),
<i>archive_read_set_options</i>(3), <i>archive_util</i>(3),
<i>libarchive</i>(3), <i>tar</i>(5) Debian February 2, 2012
<i>ARCHIVE_READ_EXTRACT</i>(3)</p>
<hr>
</body>
</html>