Go to main content

man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

archive_read_header (3archive)

Name

archive_read_header - functions for reading streaming archives

Synopsis

#include <archive.h>
int
archive_read_next_header(struct archive *, struct archive_entry **);
int
archive_read_next_header2(struct archive *, struct archive_entry *);

Description

                                                 ARCHIVE_READ_HEADER(3archive)



NAME
       archive_read_next_header, archive_read_next_header2 - functions for
       reading streaming archives

LIBRARY
       Streaming Archive Library (libarchive, -larchive)

SYNOPSIS
       #include <archive.h>
       int
       archive_read_next_header(struct archive *, struct archive_entry **);
       int
       archive_read_next_header2(struct archive *, struct archive_entry *);

DESCRIPTION
            archive_read_next_header()
                   Read the header for the next entry and return a pointer to
                   a Tn struct archive_entry.  This is a convenience wrapper
                   around archive_read_next_header2() that reuses an internal
                   Tn struct archive_entry object for each request.

            archive_read_next_header2()
                   Read the header for the next entry and populate the pro-
                   vided Tn struct archive_entry.

RETURN VALUES
       These functions return ARCHIVE_OK (the operation succeeded), AR-
       CHIVE_WARN (the operation succeeded but a non-critical error was
       encountered), ARCHIVE_EOF (end-of-archive was encountered), AR-
       CHIVE_RETRY (the operation failed but can be retried), and AR-
       CHIVE_FATAL (there was a fatal error; the archive should be closed
       immediately).

ERRORS
       Detailed error codes and textual descriptions are available from the
       archive_errno() and archive_error_string() functions.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+--------------------+
       |ATTRIBUTE TYPE |  ATTRIBUTE VALUE   |
       +---------------+--------------------+
       |Availability   | library/libarchive |
       +---------------+--------------------+
       |Stability      | Uncommitted        |
       +---------------+--------------------+

SEE ALSO
       tar(1), archive_read(3), archive_read_data(3), archive_read_extract(3),
       archive_read_filter(3), archive_read_format(3), archive_read_open(3),
       archive_read_set_options(3), archive_util(3), libarchive(3)



NOTES
       Source code for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       https://github.com/libarchive/libarchive/releases/down-
       load/v3.6.1/libarchive-3.6.1.tar.gz.

       Further information about this software can be found on the open source
       community website at http://www.libarchive.org/.



                               February 2, 2012
                                                 ARCHIVE_READ_HEADER(3archive)