|
Packit Service |
1d0348 |
ARCHIVE_READ_FORMAT(3) manual page
|
|
Packit Service |
1d0348 |
== NAME ==
|
|
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'''
|
|
Packit Service |
1d0348 |
- functions for reading streaming archives
|
|
Packit Service |
1d0348 |
== LIBRARY ==
|
|
Packit Service |
1d0348 |
Streaming Archive Library (libarchive, -larchive)
|
|
Packit Service |
1d0348 |
== SYNOPSIS ==
|
|
Packit Service |
1d0348 |
'''<nowiki>#include <archive.h></nowiki>'''
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
''int''
|
|
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 |
'''archive_read_support_format_all'''(''struct archive *'');
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
''int''
|
|
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 |
'''archive_read_support_format_by_code'''(''struct archive *'', ''int'');
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
''int''
|
|
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 |
'''archive_read_support_format_cpio'''(''struct archive *'');
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
''int''
|
|
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 |
'''archive_read_support_format_iso9660'''(''struct archive *'');
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
''int''
|
|
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 |
'''archive_read_support_format_mtree'''(''struct archive *'');
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
''int''
|
|
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 |
'''archive_read_support_format_raw'''(''struct archive *'');
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
''int''
|
|
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 |
'''archive_read_support_format_xar'''(''struct archive *'');
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
''int''
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
'''archive_read_support_format_zip'''(''struct archive *'');
|
|
Packit Service |
1d0348 |
== DESCRIPTION ==
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
|
|
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 auto-detection code---for the
|
|
Packit Service |
1d0348 |
specified archive format.
|
|
Packit Service |
1d0348 |
For example,
|
|
Packit Service |
1d0348 |
'''archive_read_support_format_tar'''()
|
|
Packit Service |
1d0348 |
enables support for a variety of standard tar formats, old-style tar,
|
|
Packit Service |
1d0348 |
ustar, pax interchange format, and many common variants.
|
|
Packit Service |
1d0348 |
'''archive_read_support_format_all'''()
|
|
Packit Service |
1d0348 |
Enables support for all available formats except the
|
|
Packit Service |
1d0348 |
"raw"
|
|
Packit Service |
1d0348 |
format (see below).
|
|
Packit Service |
1d0348 |
'''archive_read_support_format_by_code'''()
|
|
Packit Service |
1d0348 |
Enables a single format specified by the format code.
|
|
Packit Service |
1d0348 |
This can be useful when reading a single archive twice;
|
|
Packit Service |
1d0348 |
use
|
|
Packit Service |
1d0348 |
'''archive_format'''()
|
|
Packit Service |
1d0348 |
after reading the first time and pass the resulting code
|
|
Packit Service |
1d0348 |
to this function to selectively enable only the necessary
|
|
Packit Service |
1d0348 |
format support.
|
|
Packit Service |
1d0348 |
Note: In statically-linked executables, this will cause
|
|
Packit Service |
1d0348 |
your program to include support for every format.
|
|
Packit Service |
1d0348 |
If executable size is a concern, you may wish to avoid
|
|
Packit Service |
1d0348 |
using this function.
|
|
Packit Service |
1d0348 |
'''archive_read_support_format_empty'''()
|
|
Packit Service |
1d0348 |
Enables support for treating empty files as empty archives.
|
|
Packit Service |
1d0348 |
Because empty files are valid for several different formats,
|
|
Packit Service |
1d0348 |
it is not possible to accurately determine a format for
|
|
Packit Service |
1d0348 |
an empty file based purely on contents.
|
|
Packit Service |
1d0348 |
So empty files are treated by libarchive as a distinct
|
|
Packit Service |
1d0348 |
format.
|
|
Packit Service |
1d0348 |
'''archive_read_support_format_raw'''()
|
|
Packit Service |
1d0348 |
The
|
|
Packit Service |
1d0348 |
"raw"
|
|
Packit Service |
1d0348 |
format handler allows libarchive to be used to read arbitrary data.
|
|
Packit Service |
1d0348 |
It treats any data stream as an archive with a single entry.
|
|
Packit Service |
1d0348 |
The pathname of this entry is
|
|
Packit Service |
1d0348 |
"data ;"
|
|
Packit Service |
1d0348 |
all other entry fields are unset.
|
|
Packit Service |
1d0348 |
This is not enabled by
|
|
Packit Service |
1d0348 |
'''archive_read_support_format_all'''()
|
|
Packit Service |
1d0348 |
in order to avoid erroneous handling of damaged archives.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
== RETURN VALUES ==
|
|
Packit Service |
1d0348 |
These functions return
|
|
Packit Service |
1d0348 |
'''ARCHIVE_OK'''
|
|
Packit Service |
1d0348 |
on success, or
|
|
Packit Service |
1d0348 |
'''ARCHIVE_FATAL'''.
|
|
Packit Service |
1d0348 |
== ERRORS ==
|
|
Packit Service |
1d0348 |
Detailed error codes and textual descriptions are available from the
|
|
Packit Service |
1d0348 |
'''archive_errno'''()
|
|
Packit Service |
1d0348 |
and
|
|
Packit Service |
1d0348 |
'''archive_error_string'''()
|
|
Packit Service |
1d0348 |
functions.
|
|
Packit Service |
1d0348 |
== SEE ALSO ==
|
|
Packit Service |
1d0348 |
[[ManPageBsdtar1]],
|
|
Packit Service |
1d0348 |
[[ManPageibarchive3]],
|
|
Packit Service |
1d0348 |
[[ManPagerchiveeadata3]],
|
|
Packit Service |
1d0348 |
[[ManPagerchiveeadilter3]],
|
|
Packit Service |
1d0348 |
[[ManPagerchiveeadetptions3]],
|
|
Packit Service |
1d0348 |
[[ManPagerchivetil3]],
|
|
Packit Service |
1d0348 |
[[ManPageTar5]]
|
|
Packit Service |
1d0348 |
== BUGS ==
|
|
Packit Service |
1d0348 |
Many traditional archiver programs treat
|
|
Packit Service |
1d0348 |
empty files as valid empty archives.
|
|
Packit Service |
1d0348 |
For example, many implementations of
|
|
Packit Service |
1d0348 |
[[ManPageBsdtar1]]
|
|
Packit Service |
1d0348 |
allow you to append entries to an empty file.
|
|
Packit Service |
1d0348 |
Of course, it is impossible to determine the format of an empty file
|
|
Packit Service |
1d0348 |
by inspecting the contents, so this library treats empty files as
|
|
Packit Service |
1d0348 |
having a special
|
|
Packit Service |
1d0348 |
"empty"
|
|
Packit Service |
1d0348 |
format.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Using the
|
|
Packit Service |
1d0348 |
"raw"
|
|
Packit Service |
1d0348 |
handler together with any other handler will often work
|
|
Packit Service |
1d0348 |
but can produce surprising results.
|