Blame doc/html/archive_read_format.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_FORMAT(3) BSD Library Functions Manual

Packit Service 1d0348
ARCHIVE_READ_FORMAT(3)

Packit Service 1d0348
Packit Service 1d0348

NAME

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

archive_read_support_format_7zip,

Packit Service 1d0348
archive_read_support_format_all,
Packit Service 1d0348
archive_read_support_format_ar,
Packit Service 1d0348
archive_read_support_format_by_code,
Packit Service 1d0348
archive_read_support_format_cab,
Packit Service 1d0348
archive_read_support_format_cpio,
Packit Service 1d0348
archive_read_support_format_empty,
Packit Service 1d0348
archive_read_support_format_iso9660,
Packit Service 1d0348
archive_read_support_format_lha,
Packit Service 1d0348
archive_read_support_format_mtree,
Packit Service 1d0348
archive_read_support_format_rar,
Packit Service 1d0348
archive_read_support_format_raw,
Packit Service 1d0348
archive_read_support_format_tar,
Packit Service 1d0348
archive_read_support_format_xar,
Packit Service 1d0348
archive_read_support_format_zip — functions for
Packit Service 1d0348
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_support_format_7zip(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_all(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_ar(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_by_code(struct archive *,

Packit Service 1d0348
int);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_cab(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_cpio(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_empty(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_iso9660(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_lha(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_mtree(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_rar(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_raw(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_tar(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_xar(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

int

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

archive_read_support_format_zip(struct archive *);

Packit Service 1d0348
Packit Service 1d0348

DESCRIPTION

Packit Service 1d0348
archive_read_support_format_7zip(),
Packit Service 1d0348
archive_read_support_format_ar(),
Packit Service 1d0348
archive_read_support_format_cab(),
Packit Service 1d0348
archive_read_support_format_cpio(),
Packit Service 1d0348
archive_read_support_format_iso9660(),
Packit Service 1d0348
archive_read_support_format_lha(),
Packit Service 1d0348
archive_read_support_format_mtree(),
Packit Service 1d0348
archive_read_support_format_rar(),
Packit Service 1d0348
archive_read_support_format_raw(),
Packit Service 1d0348
archive_read_support_format_tar(),
Packit Service 1d0348
archive_read_support_format_xar(),
Packit Service 1d0348
archive_read_support_format_zip()

Packit Service 1d0348
Packit Service 1d0348

Enables support---including

Packit Service 1d0348
auto-detection code---for the specified archive format. For
Packit Service 1d0348
example, archive_read_support_format_tar() enables
Packit Service 1d0348
support for a variety of standard tar formats, old-style
Packit Service 1d0348
tar, ustar, pax interchange format, and many common
Packit Service 1d0348
variants.

Packit Service 1d0348
Packit Service 1d0348

archive_read_support_format_all()

Packit Service 1d0348
Packit Service 1d0348

Enables support for all

Packit Service 1d0348
available formats except the ’’raw’’
Packit Service 1d0348
format (see below).

Packit Service 1d0348
Packit Service 1d0348

archive_read_support_format_by_code()

Packit Service 1d0348
Packit Service 1d0348

Enables a single format

Packit Service 1d0348
specified by the format code. This can be useful when
Packit Service 1d0348
reading a single archive twice; use archive_format()
Packit Service 1d0348
after reading the first time and pass the resulting code to
Packit Service 1d0348
this function to selectively enable only the necessary
Packit Service 1d0348
format support. Note: In statically-linked executables, this
Packit Service 1d0348
will cause your program to include support for every format.
Packit Service 1d0348
If executable size is a concern, you may wish to avoid using
Packit Service 1d0348
this function.

Packit Service 1d0348
Packit Service 1d0348

archive_read_support_format_empty()

Packit Service 1d0348
Packit Service 1d0348

Enables support for treating

Packit Service 1d0348
empty files as empty archives. Because empty files are valid
Packit Service 1d0348
for several different formats, it is not possible to
Packit Service 1d0348
accurately determine a format for an empty file based purely
Packit Service 1d0348
on contents. So empty files are treated by libarchive as a
Packit Service 1d0348
distinct format.

Packit Service 1d0348
Packit Service 1d0348

archive_read_support_format_raw()

Packit Service 1d0348
Packit Service 1d0348

The

Packit Service 1d0348
’’raw’’ format handler allows
Packit Service 1d0348
libarchive to be used to read arbitrary data. It treats any
Packit Service 1d0348
data stream as an archive with a single entry. The pathname
Packit Service 1d0348
of this entry is ’’data’’; all other
Packit Service 1d0348
entry fields are unset. This is not enabled by
Packit Service 1d0348
archive_read_support_format_all() in order to avoid
Packit Service 1d0348
erroneous handling of damaged archives.

Packit Service 1d0348
Packit Service 1d0348

RETURN VALUES

Packit Service 1d0348
Packit Service 1d0348

These functions return

Packit Service 1d0348
ARCHIVE_OK on success, or ARCHIVE_FATAL.

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_data(3), archive_read_filter(3),
Packit Service 1d0348
archive_read_set_options(3), archive_util(3), tar(5)

Packit Service 1d0348
Packit Service 1d0348

BUGS

Packit Service 1d0348
Packit Service 1d0348

Many traditional archiver

Packit Service 1d0348
programs treat empty files as valid empty archives. For
Packit Service 1d0348
example, many implementations of tar(1) allow you to append
Packit Service 1d0348
entries to an empty file. Of course, it is impossible to
Packit Service 1d0348
determine the format of an empty file by inspecting the
Packit Service 1d0348
contents, so this library treats empty files as having a
Packit Service 1d0348
special ’’empty’’ format.

Packit Service 1d0348
Packit Service 1d0348

Using the

Packit Service 1d0348
’’raw’’ handler together with any
Packit Service 1d0348
other handler will often work but can produce surprising
Packit Service 1d0348
results.

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>