1 ARCHIVE_READ_EXTRACT(3) manual page
3 '''archive_read_extract''',
4 '''archive_read_extract2''',
5 '''archive_read_extract_set_progress_callback'''
6 - functions for reading streaming archives
8 Streaming Archive Library (libarchive, -larchive)
10 '''<nowiki>#include <archive.h></nowiki>'''
14 '''archive_read_extract'''(''struct archive *'', ''struct archive_entry *'', ''int flags'');
18 '''archive_read_extract2'''(''struct archive *src'', ''struct archive_entry *'', ''struct archive *dest'');
22 '''archive_read_extract_set_progress_callback'''(''struct archive *'', ''void (*func)(void *)'', ''void *user_data'');
25 <dt>'''archive_read_extract'''(), '''archive_read_extract_set_skip_file'''()</dt><dd>
26 A convenience function that wraps the corresponding
27 [[ManPagerchiveriteisk3]]
30 '''archive_read_extract'''()
31 creates a restore object using
32 [[ManPagerchiveriteiskew3]]
34 [[ManPagerchiveriteiskettandardookup3]],
35 then transparently invokes
36 [[ManPagerchiveriteisketptions3]],
37 [[ManPagerchiveriteeader3]],
38 [[ManPagerchiveriteata3]],
40 [[ManPagerchiveriteinishntry3]]
41 to create the entry on disk and copy data into it.
44 argument is passed unmodified to
45 [[ManPagerchiveriteisketptions3]].
46 </dd><dt>'''archive_read_extract2'''()</dt><dd>
47 This is another version of
48 '''archive_read_extract'''()
49 that allows you to provide your own restore object.
50 In particular, this allows you to override the standard lookup functions
52 [[ManPagerchiveriteisketroupookup3]],
54 [[ManPagerchiveriteisketserookup3]].
56 '''archive_read_extract2'''()
59 argument; you should use
60 '''archive_write_disk_set_options'''()
61 to set the restore options yourself.
62 </dd><dt>'''archive_read_extract_set_progress_callback'''()</dt><dd>
63 Sets a pointer to a user-defined callback that can be used
64 for updating progress displays during extraction.
65 The progress function will be invoked during the extraction of large
67 The progress function will be invoked with the pointer provided to this call.
68 Generally, the data pointed to should include a reference to the archive
69 object and the archive_entry object so that various statistics
70 can be retrieved for the progress display.
73 Most functions return zero on success, non-zero on error.
74 The possible return codes include:
76 (the operation succeeded),
78 (the operation succeeded but a non-critical error was encountered),
80 (end-of-archive was encountered),
82 (the operation failed but can be retried),
85 (there was a fatal error; the archive should be closed immediately).
87 Detailed error codes and textual descriptions are available from the
90 '''archive_error_string'''()
94 [[ManPageibarchive3]],
95 [[ManPagerchiveead3]],
96 [[ManPagerchiveeadata3]],
97 [[ManPagerchiveeadilter3]],
98 [[ManPagerchiveeadormat3]],
99 [[ManPagerchiveeadpen3]],
100 [[ManPagerchiveeadetptions3]],
101 [[ManPagerchivetil3]],