🌻 📖 Archive::Libarchive::API

NAME

Archive::Libarchive::API - Comprehensive API documentation for Archive::Libarchive

VERSION

version 0.09

SYNOPSIS

 use 5.020;
 use Archive::Libarchive qw( :const );
 
 my $r = Archive::Libarchive::ArchiveRead->new;
 $r->support_filter_all;
 $r->support_format_all;
 $r->open_filename("archive.tar", 10240) == ARCHIVE_OK
   or die $r->error_string;
 
 my $e = Archive::Libarchive::Entry->new;
 say $e->pathname while $r->next_header($e) == ARCHIVE_OK;

DESCRIPTION

This document covers comprehensive list of methods and constants provided by Archive::Libarchive classes. The top level document Archive::Libarchive is a better place to start, along with the main documentation pages for each class, as while not comprehensive, do cover in more detail the methods and features that you are most likely to use in practice, and they include examples. This document is intended primarily for reference.

This document includes method signatures for each method provided by the API, but because of the large number of methods, the exact function of all methods is not provided. You can usually get the idea from the method names, or consult the libarchive documentation. A familiarity with the libarchive API is therefore helpful.

Because libarchive contains class name prefixes for its methods to provide a pseudo object oriented interface in C, and because this Perl interface is properly object oriented, the names of all methods have been changed. (Mostly by removing the class prefix, although, some have been modified beyond that because simply removing the class prefix makes some method names confusing). To help you find the equivalent libarchive documentation, the original libarchive function names are included in the method usage.

Some methods are marked as (optional). These methods were added to libarchive after the current minimum supported by Archive::Libarchive, and therefore might not be available depending on the version of libarchive you have installed. If you need your code to work on both old code and to take advantage of these methods on new versions you can use the can method to see if these methods are available.

If you need one or more of these methods and your system libarchive is too old, then you can force a share install of Alien::Libarchive3.

 env ALIEN_INSTALL_TYPE=share cpanm --reinstall Alien::Libarchive3

Archive::Libarchive

Main documentation and examples: Archive::Libarchive

archive_bzlib_version

 # archive_bzlib_version
 my $string = archive_bzlib_version();

The bzlib version that libarchive was built with. This will return undef if the library was not found at build time.

archive_liblz4_version

 # archive_liblz4_version
 my $string = archive_liblz4_version();

The liblz4 version that libarchive was built with. This will return undef if the library was not found at build time.

archive_liblzma_version

 # archive_liblzma_version
 my $string = archive_liblzma_version();

The liblzma version that libarchive was built with. This will return undef if the library was not found at build time.

archive_libzstd_version

 # archive_libzstd_version (optional)
 my $string = archive_libzstd_version();

The zstd version that libarchive was built with. This will return undef if the library was not found at build time.

archive_version_details

 # archive_version_details
 my $string = archive_version_details();

Detailed textual name/version of the library and its dependencies. This has the form:

libarchive x.y.z zlib/a.b.c liblzma/d.e.f ... etc ...

the list of libraries described here will vary depending on how libarchive was compiled.

archive_version_number

 # archive_version_number
 my $int = archive_version_number();

The libarchive version expressed as an integer. This will be the major, minor and patch levels each using up to three digits, so 3.5.1 will be 3005001.

archive_version_string

 # archive_version_string
 my $string = archive_version_string();

The libarchive version as a string.

archive_zlib_version

 # archive_zlib_version
 my $string = archive_zlib_version();

The zlib version that libarchive was built with. This will return undef if the library was not found at build time.

versions

 my %versions = Archive::Libarchive->versions();

This returns a hash of libarchive and Archive::Libarchive versions and dependency versions. This may be useful in a test report diagnostic.

Archive::Libarchive::Archive

Main documentation and examples: Archive::Libarchive::Archive

clear_error

 # archive_clear_error
 $ar->clear_error;

Clear the error for the corresponding archive instance.

copy_error

 # archive_copy_error
 $ar->copy_error($ar);

entry

 # archive_entry_new2
 my $e = $ar->entry;

This method creates a new Archive::Libarchive::Entry instance, like when you create an instance with that class' new method, except this form will pull character-set conversion information from the specified archive instance.

errno

 # archive_errno
 my $int = $ar->errno;

Returns the system errno code for the archive instance. For non-system level errors, this will not have a sensible value.

error_string

 # archive_error_string
 my $string = $ar->error_string;

Returns a human readable diagnostic of error for the corresponding archive instance.

file_count

 # archive_file_count
 my $int = $ar->file_count;

filter_bytes

 # archive_filter_bytes
 my $sint64 = $ar->filter_bytes($int);

filter_code

 # archive_filter_code
 my $code = $ar->filter_code($num);

This will return the filter code at position $num. For the total number of positions see the filter_count method.

The constant prefix for this method is ARCHIVE_FILTER_. This will return a dualvar where the string is the lowercase name without the prefix and the integer is the constant value. For the full list see "CONSTANTS" in Archive::Libarchive::API.

filter_count

 # archive_filter_count
 my $int = $ar->filter_count;

filter_name

 # archive_filter_name
 my $string = $ar->filter_name($int);

format

 # archive_format
 my $code = $ar->format;

This will return the format code at position $num.

The constant prefix for this method is ARCHIVE_FORMAT_. This will return a dualvar where the string is the lowercase name without the prefix and the integer is the constant value. For the full list see "CONSTANTS" in Archive::Libarchive::API.

format_name

 # archive_format_name
 my $string = $ar->format_name;

seek_data

 # archive_seek_data
 my $sint64_1 = $ar->seek_data($sint64_2, $int);

set_error

 # archive_set_error
 $ar->set_error($errno, $string);

This will set the errno code and human readable diagnostic for the archive instance. Not all errors have a corresponding errno code, so you can set that to zero (0) in that case.

Archive::Libarchive::ArchiveRead

Main documentation and examples: Archive::Libarchive::ArchiveRead
Parent class: Archive::Libarchive::Archive

add_passphrase

 # archive_read_add_passphrase
 my $int = $r->add_passphrase($string);

append_filter

 # archive_read_append_filter
 my $int = $r->append_filter($code);

Append filter to manually specify the order in which filters will be applied. This will accept either a string representation of the filter code, or the constant. The constant prefix is ARCHIVE_FILTER_. So for a gzipped file this would be either 'gzip' or ARCHIVE_FILTER_GZIP. For the full list see "CONSTANTS" in Archive::Libarchive::API.

append_filter_program

 # archive_read_append_filter_program
 my $int = $r->append_filter_program($string);

append_filter_program_signature

 # archive_read_append_filter_program_signature
 my $int = $r->append_filter_program_signature($string, $opaque, $size_t);

close

 # archive_read_close
 my $int = $r->close;

extract

 # archive_read_extract
 my $int1 = $r->extract($e, $int2);

extract2

 # archive_read_extract2
 my $int = $r->extract2($e, $ar);

extract_set_skip_file

 # archive_read_extract_set_skip_file
 $r->extract_set_skip_file($sint64_1, $sint64_2);

format_capabilities

 # archive_read_format_capabilities
 my $int = $r->format_capabilities;

has_encrypted_entries

 # archive_read_has_encrypted_entries
 my $int = $r->has_encrypted_entries;

header_position

 # archive_read_header_position
 my $sint64 = $r->header_position;

new

 # archive_read_new
 my $r = Archive::Libarchive::ArchiveRead->new;

Create a new archive read object.

next_header

 # archive_read_next_header
 my $code = $r->next_header($e);

Returns the next Archive::Libarchive::Entry object.

open

 # archive_read_open1
 # archive_read_set_callback_data
 # archive_read_set_close_callback
 # archive_read_set_open_callback
 # archive_read_set_read_callback
 # archive_read_set_seek_callback
 # archive_read_set_skip_callback
 $r->open(%callbacks);

This is a basic open method, which relies on callbacks for its implementation. The only callback that is required is the read callback. The open and close callbacks are made available mostly for the benefit of the caller. The skip and seek callbacks are used if available for some formats like zip to improve performance. All callbacks should return a normal status code, which is ARCHIVE_OK on success.

Unlike the libarchive C-API, this interface doesn't provide a facility for passing in "client" data. In Perl this is implemented using a closure, which should allow you to pass in arbitrary variables via proper scoping.

open
 $r->open(open => sub ($r) {
   ...
 });

Called immediately when the archive is "opened";

read
 $r->open(read => sub ($r, $ref) {
   $$ref = ...;
   ...
   return $size.
 });

Called when new data is required. What is passed in is a scalar reference. You should set this scalar to the next block of data. On success you should return the size of the data in bytes, and on failure return a normal status code.

seek
 $r->open(seek => sub ($r, $offset, $whence) {
   ...
 });

Called to seek to the new location. The $offset and $whence arguments work exactly like the libc fseek function.

skip
 $r->open(skip => sub ($r, $request) {
   ...
 });

Called to skip the next $request bytes. Should return the actual number of bytes skipped on success (which can be less than or equal to $request), and on failure return a normal status code.

close
 $r->open(close => sub ($r) {
   ...
 });

This is called when the archive instance is closed.

open_FILE

 $r->open_FILE($file_pointer);

This takes either a FFI::C::File, or an opaque pointer to a libc file pointer.

open_fd

 # archive_read_open_fd
 my $int1 = $r->open_fd($int2, $size_t);

open_filename

 # archive_read_open_filename
 my $int = $r->open_filename($string, $size_t);

Open a single-file archive. The $size_t argument is the block size.

open_filename

 # archive_read_open_filename
 my $int = $r->open_filename($string, $size_t);

open_filename_w

 # archive_read_open_filename_w
 my $int = $r->open_filename_w($wstring, $size_t);

open_filenames

 # archive_read_open_filenames
 my $int = $r->open_filenames(\@filenames, $size_t);

Open a multi-file archive (typically for RAR format). The $size_t argument is the block size.

open_memory

 # archive_write_open_memory
 my $code = $r->open_memory(\$buffer);

Open's the in-memory archive.

open_perlfile

 $r->open_perlfile(*FILE);

This takes a perl file handle and reads the archive from there.

read_data

 # archive_read_data
 my $size_or_code = $r->read_data(\$buffer, $size);
 my $size_or_code = $r->read_data(\$buffer);

Read in data from the content section of the archive entry. The output is written into $buffer. Up to $size bytes will be read. This will return the number of bytes read on success, zero (0) on EOF and a normal status code on error.

read_data_block

 # archive_read_data_block
 my $int = $r->read_data_block(\$buffer, \$offset);

A zero-copy version of archive_read_data that also exposes the file offset of each returned block. Note that the client has no way to specify the desired size of the block. The API does guarantee that offsets will be strictly increasing and that returned blocks will not overlap.

Gotcha with this method is that it returns ARCHIVE_EOF when there is no more data to read instead of the number of bytes. The size can be determined from the length of the newly resized $buffer.

read_data_into_fd

 # archive_read_data_into_fd
 my $int1 = $r->read_data_into_fd($int2);

read_data_skip

 # archive_read_data_skip
 my $int = $r->read_data_skip;

set_filter_option

 # archive_read_set_filter_option
 my $int = $r->set_filter_option($string1, $string2, $string3);

set_format

 # archive_read_set_format
 my $int = $r->set_format($code);

Set the format manually. This will accept either a string representation of the format, or the constant. The constant prefix is ARCHIVE_FORMAT_. So for a tar file this would be either 'tar' or ARCHIVE_FORMAT_TAR.

set_format_option

 # archive_read_set_format_option
 my $int = $r->set_format_option($string1, $string2, $string3);

set_option

 # archive_read_set_option
 my $int = $r->set_option($string1, $string2, $string3);

set_options

 # archive_read_set_options
 my $int = $r->set_options($string);

set_passphrase_callback

 # archive_read_set_passphrase_callback
 my $int = $r->set_passphrase_callback(sub ($r) {
   ...
   return $passphrase;
 });

Set a callback that will be called when a passphrase is required, for example with a .zip file with encrypted entries.

support_filter_all

 # archive_read_support_filter_all
 my $int = $r->support_filter_all;

support_filter_by_code

 # archive_read_support_filter_by_code (optional)
 my $int1 = $r->support_filter_by_code($int2);

support_filter_bzip2

 # archive_read_support_filter_bzip2
 my $int = $r->support_filter_bzip2;

support_filter_compress

 # archive_read_support_filter_compress
 my $int = $r->support_filter_compress;

support_filter_grzip

 # archive_read_support_filter_grzip
 my $int = $r->support_filter_grzip;

support_filter_gzip

 # archive_read_support_filter_gzip
 my $int = $r->support_filter_gzip;

support_filter_lrzip

 # archive_read_support_filter_lrzip
 my $int = $r->support_filter_lrzip;

support_filter_lz4

 # archive_read_support_filter_lz4
 my $int = $r->support_filter_lz4;

support_filter_lzip

 # archive_read_support_filter_lzip
 my $int = $r->support_filter_lzip;

support_filter_lzma

 # archive_read_support_filter_lzma
 my $int = $r->support_filter_lzma;

support_filter_lzop

 # archive_read_support_filter_lzop
 my $int = $r->support_filter_lzop;

support_filter_none

 # archive_read_support_filter_none
 my $int = $r->support_filter_none;

support_filter_program

 # archive_read_support_filter_program
 my $int = $r->support_filter_program($string);

support_filter_program_signature

 # archive_read_support_filter_program_signature
 my $int = $r->support_filter_program_signature($string, $opaque, $size_t);

support_filter_rpm

 # archive_read_support_filter_rpm
 my $int = $r->support_filter_rpm;

support_filter_uu

 # archive_read_support_filter_uu
 my $int = $r->support_filter_uu;

support_filter_xz

 # archive_read_support_filter_xz
 my $int = $r->support_filter_xz;

support_filter_zstd

 # archive_read_support_filter_zstd (optional)
 my $int = $r->support_filter_zstd;

support_format_7zip

 # archive_read_support_format_7zip
 my $int = $r->support_format_7zip;

support_format_all

 # archive_read_support_format_all
 my $int = $r->support_format_all;

support_format_ar

 # archive_read_support_format_ar
 my $int = $r->support_format_ar;

support_format_by_code

 # archive_read_support_format_by_code
 my $int1 = $r->support_format_by_code($int2);

support_format_cab

 # archive_read_support_format_cab
 my $int = $r->support_format_cab;

support_format_cpio

 # archive_read_support_format_cpio
 my $int = $r->support_format_cpio;

support_format_empty

 # archive_read_support_format_empty
 my $int = $r->support_format_empty;

support_format_gnutar

 # archive_read_support_format_gnutar
 my $int = $r->support_format_gnutar;

support_format_iso9660

 # archive_read_support_format_iso9660
 my $int = $r->support_format_iso9660;

support_format_lha

 # archive_read_support_format_lha
 my $int = $r->support_format_lha;

support_format_mtree

 # archive_read_support_format_mtree
 my $int = $r->support_format_mtree;

support_format_rar

 # archive_read_support_format_rar
 my $int = $r->support_format_rar;

support_format_rar5

 # archive_read_support_format_rar5 (optional)
 my $int = $r->support_format_rar5;

support_format_raw

 # archive_read_support_format_raw
 my $int = $r->support_format_raw;

support_format_tar

 # archive_read_support_format_tar
 my $int = $r->support_format_tar;

support_format_warc

 # archive_read_support_format_warc
 my $int = $r->support_format_warc;

support_format_xar

 # archive_read_support_format_xar
 my $int = $r->support_format_xar;

support_format_zip

 # archive_read_support_format_zip
 my $int = $r->support_format_zip;

support_format_zip_seekable

 # archive_read_support_format_zip_seekable
 my $int = $r->support_format_zip_seekable;

support_format_zip_streamable

 # archive_read_support_format_zip_streamable
 my $int = $r->support_format_zip_streamable;

Archive::Libarchive::ArchiveWrite

Main documentation and examples: Archive::Libarchive::ArchiveWrite
Parent class: Archive::Libarchive::Archive

add_filter

 # archive_write_add_filter
 my $int = $w->add_filter($code);

Add filter to be applied when writing the archive. This will accept either a string representation of the filter code, or the constant. The constant prefix is ARCHIVE_FILTER_. So for a gzipped file this would be either 'gzip' or ARCHIVE_FILTER_GZIP. For the full list see "CONSTANTS" in Archive::Libarchive::API.

add_filter_b64encode

 # archive_write_add_filter_b64encode
 my $int = $w->add_filter_b64encode;

add_filter_by_name

 # archive_write_add_filter_by_name
 my $int = $w->add_filter_by_name($string);

add_filter_bzip2

 # archive_write_add_filter_bzip2
 my $int = $w->add_filter_bzip2;

add_filter_compress

 # archive_write_add_filter_compress
 my $int = $w->add_filter_compress;

add_filter_grzip

 # archive_write_add_filter_grzip
 my $int = $w->add_filter_grzip;

add_filter_gzip

 # archive_write_add_filter_gzip
 my $int = $w->add_filter_gzip;

add_filter_lrzip

 # archive_write_add_filter_lrzip
 my $int = $w->add_filter_lrzip;

add_filter_lz4

 # archive_write_add_filter_lz4
 my $int = $w->add_filter_lz4;

add_filter_lzip

 # archive_write_add_filter_lzip
 my $int = $w->add_filter_lzip;

add_filter_lzma

 # archive_write_add_filter_lzma
 my $int = $w->add_filter_lzma;

add_filter_lzop

 # archive_write_add_filter_lzop
 my $int = $w->add_filter_lzop;

add_filter_none

 # archive_write_add_filter_none
 my $int = $w->add_filter_none;

add_filter_program

 # archive_write_add_filter_program
 my $int = $w->add_filter_program($string);

add_filter_uuencode

 # archive_write_add_filter_uuencode
 my $int = $w->add_filter_uuencode;

add_filter_xz

 # archive_write_add_filter_xz
 my $int = $w->add_filter_xz;

add_filter_zstd

 # archive_write_add_filter_zstd (optional)
 my $int = $w->add_filter_zstd;

close

 # archive_write_close
 my $int = $w->close;

fail

 # archive_write_fail
 my $int = $w->fail;

finish_entry

 # archive_write_finish_entry
 my $int = $w->finish_entry;

get_bytes_in_last_block

 # archive_write_get_bytes_in_last_block
 my $int = $w->get_bytes_in_last_block;

get_bytes_per_block

 # archive_write_get_bytes_per_block
 my $int = $w->get_bytes_per_block;

new

 # archive_write_new
 my $w = Archive::Libarchive::ArchiveWrite->new;

Create a new archive write object.

open

 # archive_write_open
 $w->open(%callbacks);

This is a basic open method, which relies on callbacks for its implementation. The only callback that is required is the write callback. The open and close callbacks are made available mostly for the benefit of the caller. All callbacks should return a normal status code, which is ARCHIVE_OK on success.

Unlike the libarchive C-API, this interface doesn't provide a facility for passing in "client" data. In Perl this is implemented using a closure, which should allow you to pass in arbitrary variables via proper scoping.

open
 $w->open(open => sub ($w) {
   ...
 });

Called immediately when the archive is "opened";

write
 $w->open(write => sub ($w, $ref) {
   ... = $$ref;
   return $size;
 });

This callback is called when data needs to be written to the archive. It is passed in as a reference to a scalar that contains the raw data. On success you should return the actual size of the data written in bytes, and on failure return a normal status code.

close
 $w->open(open => sub ($w) {
   ...
 });

This is called when the archive instance is closed.

open_FILE

 # archive_write_open_FILE
 $w->open_FILE($file_pointer);

This takes either a FFI::C::File, or an opaque pointer to a libc file pointer.

open_fd

 # archive_write_open_fd
 my $int1 = $w->open_fd($int2);

open_filename

 # archive_write_open_filename
 my $int = $w->open_filename($string);

open_filename_w

 # archive_write_open_filename_w
 my $int = $w->open_filename_w($wstring);

open_memory

 # archive_write_open_memory
 $w->open_memory(\$buffer);

This takes a reference to scalar and stores the archive in memory there.

open_perlfile

 $w->open_perlfile(*FILE);

This takes a perl file handle and stores the archive there.

set_bytes_in_last_block

 # archive_write_set_bytes_in_last_block
 my $int1 = $w->set_bytes_in_last_block($int2);

set_bytes_per_block

 # archive_write_set_bytes_per_block
 my $int1 = $w->set_bytes_per_block($int2);

set_filter_option

 # archive_write_set_filter_option
 my $int = $w->set_filter_option($string1, $string2, $string3);

set_format

 # archive_write_set_format
 my $int = $w->set_format($code);

Set the output format. This will accept either a string representation of the format, or the constant. The constant prefix is ARCHIVE_FORMAT_. So for a tar file this would be either 'tar' or ARCHIVE_FORMAT_TAR.

set_format_7zip

 # archive_write_set_format_7zip
 my $int = $w->set_format_7zip;

set_format_ar_bsd

 # archive_write_set_format_ar_bsd
 my $int = $w->set_format_ar_bsd;

set_format_ar_svr4

 # archive_write_set_format_ar_svr4
 my $int = $w->set_format_ar_svr4;

set_format_by_name

 # archive_write_set_format_by_name
 my $int = $w->set_format_by_name($string);

set_format_cpio

 # archive_write_set_format_cpio
 my $int = $w->set_format_cpio;

set_format_cpio_bin

 # archive_write_set_format_cpio_bin (optional)
 my $int = $w->set_format_cpio_bin;

set_format_cpio_newc

 # archive_write_set_format_cpio_newc
 my $int = $w->set_format_cpio_newc;

set_format_cpio_odc

 # archive_write_set_format_cpio_odc (optional)
 my $int = $w->set_format_cpio_odc;

set_format_cpio_pwb

 # archive_write_set_format_cpio_pwb (optional)
 my $int = $w->set_format_cpio_pwb;

set_format_filter_by_ext

 # archive_write_set_format_filter_by_ext
 my $int = $w->set_format_filter_by_ext($string);

set_format_filter_by_ext_def

 # archive_write_set_format_filter_by_ext_def
 my $int = $w->set_format_filter_by_ext_def($string1, $string2);

set_format_gnutar

 # archive_write_set_format_gnutar
 my $int = $w->set_format_gnutar;

set_format_iso9660

 # archive_write_set_format_iso9660
 my $int = $w->set_format_iso9660;

set_format_mtree

 # archive_write_set_format_mtree
 my $int = $w->set_format_mtree;

set_format_mtree_classic

 # archive_write_set_format_mtree_classic
 my $int = $w->set_format_mtree_classic;

set_format_option

 # archive_write_set_format_option
 my $int = $w->set_format_option($string1, $string2, $string3);

set_format_pax

 # archive_write_set_format_pax
 my $int = $w->set_format_pax;

set_format_pax_restricted

 # archive_write_set_format_pax_restricted
 my $int = $w->set_format_pax_restricted;

set_format_raw

 # archive_write_set_format_raw
 my $int = $w->set_format_raw;

set_format_shar

 # archive_write_set_format_shar
 my $int = $w->set_format_shar;

set_format_shar_dump

 # archive_write_set_format_shar_dump
 my $int = $w->set_format_shar_dump;

set_format_ustar

 # archive_write_set_format_ustar
 my $int = $w->set_format_ustar;

set_format_v7tar

 # archive_write_set_format_v7tar
 my $int = $w->set_format_v7tar;

set_format_warc

 # archive_write_set_format_warc
 my $int = $w->set_format_warc;

set_format_xar

 # archive_write_set_format_xar
 my $int = $w->set_format_xar;

set_format_zip

 # archive_write_set_format_zip
 my $int = $w->set_format_zip;

set_option

 # archive_write_set_option
 my $int = $w->set_option($string1, $string2, $string3);

set_options

 # archive_write_set_options
 my $int = $w->set_options($string);

set_passphrase

 # archive_write_set_passphrase
 my $int = $w->set_passphrase($string);

set_passphrase_callback

 # archive_write_set_passphrase_callback
 my $int = $w->set_passphrase_callback(sub ($w) {
   ...
   return $passphrase;
 });

Set a callback that will be called when a passphrase is required, for example with a .zip file with encrypted entries.

set_skip_file

 # archive_write_set_skip_file
 my $int = $w->set_skip_file($sint64_1, $sint64_2);

write_data

 # archive_write_data
 my $size_or_code = $w->write_data(\$buffer);

Write the entry content data to the archive. This takes a reference to the buffer. Returns the number of bytes written on success, and a normal status code on error.

write_header

 # archive_write_header
 my $int = $w->write_header($e);

zip_set_compression_deflate

 # archive_write_zip_set_compression_deflate
 my $int = $w->zip_set_compression_deflate;

zip_set_compression_store

 # archive_write_zip_set_compression_store
 my $int = $w->zip_set_compression_store;

Archive::Libarchive::DiskRead

Main documentation and examples: Archive::Libarchive::DiskRead
Parent class: Archive::Libarchive::ArchiveRead

disk_can_descend

 # archive_read_disk_can_descend
 my $int = $dr->disk_can_descend;

disk_current_filesystem

 # archive_read_disk_current_filesystem
 my $int = $dr->disk_current_filesystem;

disk_current_filesystem_is_remote

 # archive_read_disk_current_filesystem_is_remote
 my $int = $dr->disk_current_filesystem_is_remote;

disk_current_filesystem_is_synthetic

 # archive_read_disk_current_filesystem_is_synthetic
 my $int = $dr->disk_current_filesystem_is_synthetic;

disk_descend

 # archive_read_disk_descend
 my $int = $dr->disk_descend;

disk_gname

 # archive_read_disk_gname
 my $string = $dr->disk_gname($sint64);

disk_open

 # archive_read_disk_open
 my $int = $dr->disk_open($string);

disk_open_w

 # archive_read_disk_open_w
 my $int = $dr->disk_open_w($wstring);

disk_set_atime_restored

 # archive_read_disk_set_atime_restored
 my $int = $dr->disk_set_atime_restored;

disk_set_behavior

 # archive_read_disk_set_behavior
 my $int1 = $dr->disk_set_behavior($int2);

disk_set_standard_lookup

 # archive_read_disk_set_standard_lookup
 my $int = $dr->disk_set_standard_lookup;

disk_set_symlink_hybrid

 # archive_read_disk_set_symlink_hybrid
 my $int = $dr->disk_set_symlink_hybrid;

disk_set_symlink_logical

 # archive_read_disk_set_symlink_logical
 my $int = $dr->disk_set_symlink_logical;

disk_set_symlink_physical

 # archive_read_disk_set_symlink_physical
 my $int = $dr->disk_set_symlink_physical;

disk_uname

 # archive_read_disk_uname
 my $string = $dr->disk_uname($sint64);

new

 my $dr = Archive::Libarchive::DiskRead->new;

Create a new disk read object.

Archive::Libarchive::DiskWrite

Main documentation and examples: Archive::Libarchive::DiskWrite
Parent class: Archive::Libarchive::ArchiveWrite

disk_gid

 # archive_write_disk_gid
 my $sint64_1 = $dw->disk_gid($string, $sint64_2);

disk_set_options

 # archive_write_disk_set_options
 my $int1 = $dw->disk_set_options($int2);

disk_set_skip_file

 # archive_write_disk_set_skip_file
 my $int = $dw->disk_set_skip_file($sint64_1, $sint64_2);

disk_set_standard_lookup

 # archive_write_disk_set_standard_lookup
 my $int = $dw->disk_set_standard_lookup;

disk_uid

 # archive_write_disk_uid
 my $sint64_1 = $dw->disk_uid($string, $sint64_2);

new

 # archive_write_disk_new
 my $dw = Archive::Libarchive::DiskWrite->new;

Create a new disk write object.

write_data_block

 # archive_write_data_block
 my $ssize_t = $dw->write_data_block(\$buffer, $offset);

Write the entry content data to the disk. This is intended to be used with "read_data_block" in Archive::Libarchive::ArchiveRead.

Archive::Libarchive::Entry

Main documentation and examples: Archive::Libarchive::Entry

acl_add_entry

 # archive_entry_acl_add_entry
 my $int1 = $e->acl_add_entry($int2, $int3, $int4, $int5, $string);

acl_add_entry_w

 # archive_entry_acl_add_entry_w
 my $int1 = $e->acl_add_entry_w($int2, $int3, $int4, $int5, $wstring);

acl_clear

 # archive_entry_acl_clear
 $e->acl_clear;

acl_count

 # archive_entry_acl_count
 my $int1 = $e->acl_count($int2);

acl_from_text

 # archive_entry_acl_from_text (optional)
 my $int1 = $e->acl_from_text($string, $int2);

acl_from_text_w

 # archive_entry_acl_from_text_w (optional)
 my $int1 = $e->acl_from_text_w($wstring, $int2);

acl_next

 # archive_entry_acl_next
 my $int1 = $e->acl_next($int2, $int*1, $int*2, $int*3, $int*4, \$string);

acl_reset

 # archive_entry_acl_reset
 my $int1 = $e->acl_reset($int2);

acl_to_text

 # archive_entry_acl_to_text (optional)
 my $string = $e->acl_to_text(\$ssize_t, $int);

acl_to_text_w

 # archive_entry_acl_to_text_w (optional)
 my $wstring = $e->acl_to_text_w(\$ssize_t, $int);

acl_types

 # archive_entry_acl_types (optional)
 my $int = $e->acl_types;

atime

 # archive_entry_atime
 my $time_t = $e->atime;

atime_is_set

 # archive_entry_atime_is_set
 my $int = $e->atime_is_set;

atime_nsec

 # archive_entry_atime_nsec
 my $long = $e->atime_nsec;

birthtime

 # archive_entry_birthtime
 my $time_t = $e->birthtime;

birthtime_is_set

 # archive_entry_birthtime_is_set
 my $int = $e->birthtime_is_set;

birthtime_nsec

 # archive_entry_birthtime_nsec
 my $long = $e->birthtime_nsec;

clear

 # archive_entry_clear
 $e->clear;

clone

 # archive_entry_clone
 my $e2 = $e->clone;

Clone the entry instance.

copy_fflags_text

 # archive_entry_copy_fflags_text
 my $string1 = $e->copy_fflags_text($string2);

copy_fflags_text_w

 # archive_entry_copy_fflags_text_w
 my $wstring1 = $e->copy_fflags_text_w($wstring2);

copy_gname

 # archive_entry_copy_gname
 $e->copy_gname($string);

copy_gname_w

 # archive_entry_copy_gname_w
 $e->copy_gname_w($wstring);

copy_hardlink

 # archive_entry_copy_hardlink
 $e->copy_hardlink($string);

copy_hardlink_w

 # archive_entry_copy_hardlink_w
 $e->copy_hardlink_w($wstring);

copy_link

 # archive_entry_copy_link
 $e->copy_link($string);

copy_link_w

 # archive_entry_copy_link_w
 $e->copy_link_w($wstring);

copy_mac_metadata

 # archive_entry_copy_mac_metadata
 $e->copy_mac_metadata($meta);

Sets the mac metadata to $meta.

copy_pathname

 # archive_entry_copy_pathname
 $e->copy_pathname($string);

copy_pathname_w

 # archive_entry_copy_pathname_w
 $e->copy_pathname_w($wstring);

copy_sourcepath

 # archive_entry_copy_sourcepath
 $e->copy_sourcepath($string);

copy_sourcepath_w

 # archive_entry_copy_sourcepath_w
 $e->copy_sourcepath_w($wstring);

copy_stat

 # archive_entry_copy_stat
 $e->copy_stat($stat);

Copies the values from a FFI::C::Stat instance.

Not currently implemented on Windows.

copy_symlink

 # archive_entry_copy_symlink
 $e->copy_symlink($string);

copy_symlink_w

 # archive_entry_copy_symlink_w
 $e->copy_symlink_w($wstring);

copy_uname

 # archive_entry_copy_uname
 $e->copy_uname($string);

copy_uname_w

 # archive_entry_copy_uname_w
 $e->copy_uname_w($wstring);

ctime

 # archive_entry_ctime
 my $time_t = $e->ctime;

ctime_is_set

 # archive_entry_ctime_is_set
 my $int = $e->ctime_is_set;

ctime_nsec

 # archive_entry_ctime_nsec
 my $long = $e->ctime_nsec;

dev

 # archive_entry_dev
 my $dev_t = $e->dev;

dev_is_set

 # archive_entry_dev_is_set
 my $int = $e->dev_is_set;

devmajor

 # archive_entry_devmajor
 my $dev_t = $e->devmajor;

devminor

 # archive_entry_devminor
 my $dev_t = $e->devminor;

digest

 # archive_entry_digest
 my $string = $e->digest($type);

This is used to query the raw hex digest for the given entry. The type of digest is provided as an argument. The type may be passed in as either a string or an integer constant. The constant prefix is ARCHIVE_ENTRY_DIGEST_. So for an MD5 digest you could pass in either 'md5' or ARCHIVE_ENTRY_DIGEST_MD5.

fflags

 # archive_entry_fflags
 $e->fflags($ulong*1, $ulong*2);

fflags_text

 # archive_entry_fflags_text
 my $string = $e->fflags_text;

filetype

 # archive_entry_filetype
 my $code = $e->filetype;

This returns the type of file for the entry. This will be a dualvar where the string is one of mt, reg, lnx, sock, chr, blk, dir or ifo, and integer values will match the corresponding AE_IF prefixed constant. See "CONSTANTS" in Archive::Libarchive::API for the full list.

filetype_is_set

 # archive_entry_filetype_is_set (optional)
 my $int = $e->filetype_is_set;

gid

 # archive_entry_gid
 my $sint64 = $e->gid;

gid_is_set

 # archive_entry_gid_is_set (optional)
 my $int = $e->gid_is_set;

gname

 # archive_entry_gname
 my $string = $e->gname;

gname_utf8

 # archive_entry_gname_utf8
 my $string_utf8 = $e->gname_utf8;

hardlink

 # archive_entry_hardlink
 my $string = $e->hardlink;

hardlink_utf8

 # archive_entry_hardlink_utf8
 my $string_utf8 = $e->hardlink_utf8;

ino

 # archive_entry_ino
 my $sint64 = $e->ino;

ino64

 # archive_entry_ino64
 my $sint64 = $e->ino64;

ino_is_set

 # archive_entry_ino_is_set
 my $int = $e->ino_is_set;

is_data_encrypted

 # archive_entry_is_data_encrypted
 my $int = $e->is_data_encrypted;

is_encrypted

 # archive_entry_is_encrypted
 my $int = $e->is_encrypted;

is_metadata_encrypted

 # archive_entry_is_metadata_encrypted
 my $int = $e->is_metadata_encrypted;

mac_metadata

 # archive_entry_mac_metadata
 my $meta = $e->mac_metadata;

Get the mac metadata from the entry.

mode

 # archive_entry_mode
 my $mode_t = $e->mode;

mtime

 # archive_entry_mtime
 my $time_t = $e->mtime;

mtime_is_set

 # archive_entry_mtime_is_set
 my $int = $e->mtime_is_set;

mtime_nsec

 # archive_entry_mtime_nsec
 my $long = $e->mtime_nsec;

new

 my $e = Archive::Libarchive::Entry->new;

Create a new Entry object.

nlink

 # archive_entry_nlink
 my $uint = $e->nlink;

pathname

 # archive_entry_pathname
 my $string = $e->pathname;

pathname_utf8

 # archive_entry_pathname_utf8
 my $string_utf8 = $e->pathname_utf8;

perm

 # archive_entry_perm
 my $mode_t = $e->perm;

perm_is_set

 # archive_entry_perm_is_set (optional)
 my $int = $e->perm_is_set;

rdev

 # archive_entry_rdev
 my $dev_t = $e->rdev;

rdevmajor

 # archive_entry_rdevmajor
 my $dev_t = $e->rdevmajor;

rdevminor

 # archive_entry_rdevminor
 my $dev_t = $e->rdevminor;

set_atime

 # archive_entry_set_atime
 $e->set_atime($time_t, $long);

set_birthtime

 # archive_entry_set_birthtime
 $e->set_birthtime($time_t, $long);

set_ctime

 # archive_entry_set_ctime
 $e->set_ctime($time_t, $long);

set_dev

 # archive_entry_set_dev
 $e->set_dev($dev_t);

set_devmajor

 # archive_entry_set_devmajor
 $e->set_devmajor($dev_t);

set_devminor

 # archive_entry_set_devminor
 $e->set_devminor($dev_t);

set_fflags

 # archive_entry_set_fflags
 $e->set_fflags($ulong1, $ulong2);

set_filetype

 # archive_entry_set_filetype
 $e->set_filetype($code);

This sets the type of the file for the entry. This will accept either a string value which is one of mt, reg, lnx, sock, chr, blk, dir or ifo, or an integer constant value with the AE_IF prefix. See "CONSTANTS" in Archive::Libarchive::API for the full list.

set_gid

 # archive_entry_set_gid
 $e->set_gid($sint64);

set_gname

 # archive_entry_set_gname
 $e->set_gname($string);

set_gname_utf8

 # archive_entry_set_gname_utf8
 $e->set_gname_utf8($string);

set_hardlink

 # archive_entry_set_hardlink
 $e->set_hardlink($string);

set_hardlink_utf8

 # archive_entry_set_hardlink_utf8
 $e->set_hardlink_utf8($string);

set_ino

 # archive_entry_set_ino
 $e->set_ino($sint64);

set_ino64

 # archive_entry_set_ino64
 $e->set_ino64($sint64);

set_is_data_encrypted

 # archive_entry_set_is_data_encrypted
 $e->set_is_data_encrypted($char);

set_is_metadata_encrypted

 # archive_entry_set_is_metadata_encrypted
 $e->set_is_metadata_encrypted($char);

set_link

 # archive_entry_set_link
 $e->set_link($string);

set_link_utf8

 # archive_entry_set_link_utf8
 $e->set_link_utf8($string);

set_mode

 # archive_entry_set_mode
 $e->set_mode($mode_t);

set_mtime

 # archive_entry_set_mtime
 $e->set_mtime($time_t, $long);

set_nlink

 # archive_entry_set_nlink
 $e->set_nlink($uint);

set_pathname

 # archive_entry_set_pathname
 $e->set_pathname($string);

set_pathname_utf8

 # archive_entry_set_pathname_utf8
 $e->set_pathname_utf8($string);

set_perm

 # archive_entry_set_perm
 $e->set_perm($mode_t);

set_rdev

 # archive_entry_set_rdev
 $e->set_rdev($dev_t);

set_rdevmajor

 # archive_entry_set_rdevmajor
 $e->set_rdevmajor($dev_t);

set_rdevminor

 # archive_entry_set_rdevminor
 $e->set_rdevminor($dev_t);

set_size

 # archive_entry_set_size
 $e->set_size($sint64);

set_symlink

 # archive_entry_set_symlink
 $e->set_symlink($string);

set_symlink_type

 # archive_entry_set_symlink_type (optional)
 $e->set_symlink_type($int);

set_symlink_utf8

 # archive_entry_set_symlink_utf8
 $e->set_symlink_utf8($string);

set_uid

 # archive_entry_set_uid
 $e->set_uid($sint64);

set_uname

 # archive_entry_set_uname
 $e->set_uname($string);

set_uname_utf8

 # archive_entry_set_uname_utf8
 $e->set_uname_utf8($string);

size

 # archive_entry_size
 my $sint64 = $e->size;

size_is_set

 # archive_entry_size_is_set
 my $int = $e->size_is_set;

sourcepath

 # archive_entry_sourcepath
 my $string = $e->sourcepath;

sourcepath_w

 # archive_entry_sourcepath_w
 my $wstring = $e->sourcepath_w;

sparse_add_entry

 # archive_entry_sparse_add_entry
 $e->sparse_add_entry($sint64_1, $sint64_2);

sparse_clear

 # archive_entry_sparse_clear
 $e->sparse_clear;

sparse_count

 # archive_entry_sparse_count
 my $int = $e->sparse_count;

sparse_next

 # archive_entry_sparse_next
 my $int = $e->sparse_next($sint64*1, $sint64*2);

sparse_reset

 # archive_entry_sparse_reset
 my $int = $e->sparse_reset;

stat

 # archive_entry_stat
 my $stat = $e->stat;

Returns a FFI::C::Stat instance filled out from the entry metadata.

Not currently implemented on Windows.

strmode

 # archive_entry_strmode
 my $string = $e->strmode;

symlink

 # archive_entry_symlink
 my $string = $e->symlink;

symlink_type

 # archive_entry_symlink_type (optional)
 my $int = $e->symlink_type;

symlink_utf8

 # archive_entry_symlink_utf8
 my $string_utf8 = $e->symlink_utf8;

uid

 # archive_entry_uid
 my $sint64 = $e->uid;

uid_is_set

 # archive_entry_uid_is_set (optional)
 my $int = $e->uid_is_set;

uname

 # archive_entry_uname
 my $string = $e->uname;

uname_utf8

 # archive_entry_uname_utf8
 my $string_utf8 = $e->uname_utf8;

unset_atime

 # archive_entry_unset_atime
 $e->unset_atime;

unset_birthtime

 # archive_entry_unset_birthtime
 $e->unset_birthtime;

unset_ctime

 # archive_entry_unset_ctime
 $e->unset_ctime;

unset_mtime

 # archive_entry_unset_mtime
 $e->unset_mtime;

unset_size

 # archive_entry_unset_size
 $e->unset_size;

update_gname_utf8

 # archive_entry_update_gname_utf8
 my $int = $e->update_gname_utf8($string);

update_hardlink_utf8

 # archive_entry_update_hardlink_utf8
 my $int = $e->update_hardlink_utf8($string);

update_link_utf8

 # archive_entry_update_link_utf8
 my $int = $e->update_link_utf8($string);

update_pathname_utf8

 # archive_entry_update_pathname_utf8
 my $int = $e->update_pathname_utf8($string);

update_symlink_utf8

 # archive_entry_update_symlink_utf8
 my $int = $e->update_symlink_utf8($string);

update_uname_utf8

 # archive_entry_update_uname_utf8
 my $int = $e->update_uname_utf8($string);

xattr_add_entry

 # archive_entry_xattr_add_entry
 my $int = $e->xattr_add_entry($name, $value);

Adds an xattr name/value pair.

xattr_clear

 # archive_entry_xattr_clear
 $e->xattr_clear;

xattr_count

 # archive_entry_xattr_count
 my $int = $e->xattr_count;

xattr_next

 # archive_entry_xattr_next
 my $int = $e->xattr_next(\$name, $value);

Fetches the next xattr name/value pair.

xattr_reset

 # archive_entry_xattr_reset
 my $int = $e->xattr_reset;

Archive::Libarchive::EntryLinkResolver

Main documentation and examples: Archive::Libarchive::EntryLinkResolver

new

 my $r = Archive::Libarchive::EntryLinkResolver->new;

Create a new entry link resolver object.

set_strategy

 # archive_entry_linkresolver_set_strategy
 $lr->set_strategy($int);

Archive::Libarchive::Match

Main documentation and examples: Archive::Libarchive::Match
Parent class: Archive::Libarchive::Archive

exclude_entry

 # archive_match_exclude_entry
 my $int1 = $m->exclude_entry($int2, $e);

exclude_pattern

 # archive_match_exclude_pattern
 my $int = $m->exclude_pattern($string);

exclude_pattern_from_file

 # archive_match_exclude_pattern_from_file
 my $int1 = $m->exclude_pattern_from_file($string, $int2);

exclude_pattern_from_file_w

 # archive_match_exclude_pattern_from_file_w
 my $int1 = $m->exclude_pattern_from_file_w($wstring, $int2);

exclude_pattern_w

 # archive_match_exclude_pattern_w
 my $int = $m->exclude_pattern_w($wstring);

excluded

 # archive_match_excluded
 my $int = $m->excluded($e);

include_date

 # archive_match_include_date
 my $int1 = $m->include_date($int2, $string);

include_date_w

 # archive_match_include_date_w
 my $int1 = $m->include_date_w($int2, $wstring);

include_file_time

 # archive_match_include_file_time
 my $int1 = $m->include_file_time($int2, $string);

include_file_time_w

 # archive_match_include_file_time_w
 my $int1 = $m->include_file_time_w($int2, $wstring);

include_gid

 # archive_match_include_gid
 my $int = $m->include_gid($sint64);

include_gname

 # archive_match_include_gname
 my $int = $m->include_gname($string);

include_gname_w

 # archive_match_include_gname_w
 my $int = $m->include_gname_w($wstring);

include_pattern

 # archive_match_include_pattern
 my $int = $m->include_pattern($string);

include_pattern_from_file

 # archive_match_include_pattern_from_file
 my $int1 = $m->include_pattern_from_file($string, $int2);

include_pattern_from_file_w

 # archive_match_include_pattern_from_file_w
 my $int1 = $m->include_pattern_from_file_w($wstring, $int2);

include_pattern_w

 # archive_match_include_pattern_w
 my $int = $m->include_pattern_w($wstring);

include_time

 # archive_match_include_time
 my $int1 = $m->include_time($int2, $time_t, $long);

include_uid

 # archive_match_include_uid
 my $int = $m->include_uid($sint64);

include_uname

 # archive_match_include_uname
 my $int = $m->include_uname($string);

include_uname_w

 # archive_match_include_uname_w
 my $int = $m->include_uname_w($wstring);

new

 my $r = Archive::Libarchive::Match->new;

Create a new archive match object.

owner_excluded

 # archive_match_owner_excluded
 my $int = $m->owner_excluded($e);

path_excluded

 # archive_match_path_excluded
 my $int = $m->path_excluded($e);

path_unmatched_inclusions

 # archive_match_path_unmatched_inclusions
 my $int = $m->path_unmatched_inclusions;

path_unmatched_inclusions_next

 # archive_match_path_unmatched_inclusions_next
 my $int = $m->path_unmatched_inclusions_next(\$string);

set_inclusion_recursion

 # archive_match_set_inclusion_recursion (optional)
 my $int1 = $m->set_inclusion_recursion($int2);

time_excluded

 # archive_match_time_excluded
 my $int = $m->time_excluded($e);

CONSTANTS

The status code constants are documented in the main documentation page Archive::Libarchive.

These constants can be imported individually from Archive::Libarchive using the normal Exporter interface, or all of them can be imported with the :const export tag or along with functions with the :all tag.

For the rest please consult the libarchive documentation.

ARCHIVE_ENTRY_ACL_ADD_FILE
ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY
ARCHIVE_ENTRY_ACL_APPEND_DATA
ARCHIVE_ENTRY_ACL_DELETE
ARCHIVE_ENTRY_ACL_DELETE_CHILD
ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT
ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS
ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT
ARCHIVE_ENTRY_ACL_ENTRY_INHERITED
ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY
ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT
ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS
ARCHIVE_ENTRY_ACL_EVERYONE
ARCHIVE_ENTRY_ACL_EXECUTE
ARCHIVE_ENTRY_ACL_GROUP
ARCHIVE_ENTRY_ACL_GROUP_OBJ
ARCHIVE_ENTRY_ACL_INHERITANCE_NFS4
ARCHIVE_ENTRY_ACL_LIST_DIRECTORY
ARCHIVE_ENTRY_ACL_MASK
ARCHIVE_ENTRY_ACL_OTHER
ARCHIVE_ENTRY_ACL_PERMS_NFS4
ARCHIVE_ENTRY_ACL_PERMS_POSIX1E
ARCHIVE_ENTRY_ACL_READ
ARCHIVE_ENTRY_ACL_READ_ACL
ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES
ARCHIVE_ENTRY_ACL_READ_DATA
ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS
ARCHIVE_ENTRY_ACL_STYLE_COMPACT
ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID
ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT
ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA
ARCHIVE_ENTRY_ACL_STYLE_SOLARIS
ARCHIVE_ENTRY_ACL_SYNCHRONIZE
ARCHIVE_ENTRY_ACL_TYPE_ACCESS
ARCHIVE_ENTRY_ACL_TYPE_ALARM
ARCHIVE_ENTRY_ACL_TYPE_ALLOW
ARCHIVE_ENTRY_ACL_TYPE_AUDIT
ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
ARCHIVE_ENTRY_ACL_TYPE_DENY
ARCHIVE_ENTRY_ACL_TYPE_NFS4
ARCHIVE_ENTRY_ACL_TYPE_POSIX1E
ARCHIVE_ENTRY_ACL_USER
ARCHIVE_ENTRY_ACL_USER_OBJ
ARCHIVE_ENTRY_ACL_WRITE
ARCHIVE_ENTRY_ACL_WRITE_ACL
ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES
ARCHIVE_ENTRY_ACL_WRITE_DATA
ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS
ARCHIVE_ENTRY_ACL_WRITE_OWNER
ARCHIVE_ENTRY_DIGEST_MD5
ARCHIVE_ENTRY_DIGEST_RMD160
ARCHIVE_ENTRY_DIGEST_SHA1
ARCHIVE_ENTRY_DIGEST_SHA256
ARCHIVE_ENTRY_DIGEST_SHA384
ARCHIVE_ENTRY_DIGEST_SHA512
ARCHIVE_EOF
ARCHIVE_EXTRACT_ACL
ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS
ARCHIVE_EXTRACT_FFLAGS
ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED
ARCHIVE_EXTRACT_MAC_METADATA
ARCHIVE_EXTRACT_NO_AUTODIR
ARCHIVE_EXTRACT_NO_HFS_COMPRESSION
ARCHIVE_EXTRACT_NO_OVERWRITE
ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER
ARCHIVE_EXTRACT_OWNER
ARCHIVE_EXTRACT_PERM
ARCHIVE_EXTRACT_SAFE_WRITES
ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS
ARCHIVE_EXTRACT_SECURE_NODOTDOT
ARCHIVE_EXTRACT_SECURE_SYMLINKS
ARCHIVE_EXTRACT_SPARSE
ARCHIVE_EXTRACT_TIME
ARCHIVE_EXTRACT_UNLINK
ARCHIVE_EXTRACT_XATTR
ARCHIVE_FAILED
ARCHIVE_FATAL
ARCHIVE_FILTER_BZIP2
ARCHIVE_FILTER_COMPRESS
ARCHIVE_FILTER_GRZIP
ARCHIVE_FILTER_GZIP
ARCHIVE_FILTER_LRZIP
ARCHIVE_FILTER_LZ4
ARCHIVE_FILTER_LZIP
ARCHIVE_FILTER_LZMA
ARCHIVE_FILTER_LZOP
ARCHIVE_FILTER_NONE
ARCHIVE_FILTER_PROGRAM
ARCHIVE_FILTER_RPM
ARCHIVE_FILTER_UU
ARCHIVE_FILTER_XZ
ARCHIVE_FILTER_ZSTD
ARCHIVE_FORMAT_7ZIP
ARCHIVE_FORMAT_AR
ARCHIVE_FORMAT_AR_BSD
ARCHIVE_FORMAT_AR_GNU
ARCHIVE_FORMAT_BASE_MASK
ARCHIVE_FORMAT_CAB
ARCHIVE_FORMAT_CPIO
ARCHIVE_FORMAT_CPIO_AFIO_LARGE
ARCHIVE_FORMAT_CPIO_BIN_BE
ARCHIVE_FORMAT_CPIO_BIN_LE
ARCHIVE_FORMAT_CPIO_POSIX
ARCHIVE_FORMAT_CPIO_PWB
ARCHIVE_FORMAT_CPIO_SVR4_CRC
ARCHIVE_FORMAT_CPIO_SVR4_NOCRC
ARCHIVE_FORMAT_EMPTY
ARCHIVE_FORMAT_ISO9660
ARCHIVE_FORMAT_ISO9660_ROCKRIDGE
ARCHIVE_FORMAT_LHA
ARCHIVE_FORMAT_MTREE
ARCHIVE_FORMAT_RAR
ARCHIVE_FORMAT_RAR_V5
ARCHIVE_FORMAT_RAW
ARCHIVE_FORMAT_SHAR
ARCHIVE_FORMAT_SHAR_BASE
ARCHIVE_FORMAT_SHAR_DUMP
ARCHIVE_FORMAT_TAR
ARCHIVE_FORMAT_TAR_GNUTAR
ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE
ARCHIVE_FORMAT_TAR_PAX_RESTRICTED
ARCHIVE_FORMAT_TAR_USTAR
ARCHIVE_FORMAT_WARC
ARCHIVE_FORMAT_XAR
ARCHIVE_FORMAT_ZIP
ARCHIVE_MATCH_CTIME
ARCHIVE_MATCH_EQUAL
ARCHIVE_MATCH_MTIME
ARCHIVE_MATCH_NEWER
ARCHIVE_MATCH_OLDER
ARCHIVE_OK
ARCHIVE_READDISK_HONOR_NODUMP
ARCHIVE_READDISK_MAC_COPYFILE
ARCHIVE_READDISK_NO_ACL
ARCHIVE_READDISK_NO_FFLAGS
ARCHIVE_READDISK_NO_SPARSE
ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS
ARCHIVE_READDISK_NO_XATTR
ARCHIVE_READDISK_RESTORE_ATIME
ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_DATA
ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_METADATA
ARCHIVE_READ_FORMAT_CAPS_NONE
ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW
ARCHIVE_READ_FORMAT_ENCRYPTION_UNSUPPORTED
ARCHIVE_RETRY
ARCHIVE_WARN

NOT IMPLEMENTED

The following methods are not currently implemented. The reason for this is usually for one of 1) the method doesn't make sense in the context of Perl 2) the methods have been renamed, and this is the old name kept for compatibility in libarchive 3) the methods have deprecated and will be removed in a future version of libarchive 4) we haven't gotten around to writing bindings for them.

archive_compression
archive_compression_name
archive_entry_acl
archive_entry_acl_text
archive_entry_acl_text_w
archive_entry_gname_w
archive_entry_hardlink_w
archive_entry_linkify
archive_entry_partial_links
archive_entry_pathname_w
archive_entry_symlink_w
archive_entry_uname_w
archive_free
archive_position_compressed
archive_position_uncompressed
archive_read_add_callback_data
archive_read_append_callback_data
archive_read_finish
archive_read_next_header
archive_read_open
archive_read_open2
archive_read_open_file
archive_read_open_memory2
archive_read_prepend_callback_data
archive_read_set_callback_data2
archive_read_support_compression_all
archive_read_support_compression_bzip2
archive_read_support_compression_compress
archive_read_support_compression_gzip
archive_read_support_compression_lzip
archive_read_support_compression_lzma
archive_read_support_compression_none
archive_read_support_compression_program
archive_read_support_compression_program_signature
archive_read_support_compression_rpm
archive_read_support_compression_uu
archive_read_support_compression_xz
archive_utility_string_sort
archive_write_finish
archive_write_open_file
archive_write_open_memory
archive_write_set_compression_bzip2
archive_write_set_compression_compress
archive_write_set_compression_gzip
archive_write_set_compression_lzip
archive_write_set_compression_lzma
archive_write_set_compression_none
archive_write_set_compression_program
archive_write_set_compression_xz

SEE ALSO

Archive::Libarchive::Peek

Provides an interface for listing and retrieving entries from an archive without extracting them to the local filesystem.

Archive::Libarchive::Extract

Provides an interface for extracting arbitrary archives of any format/filter supported by libarchive.

Archive::Libarchive::Unwrap

Decompresses / unwraps files that have been compressed or wrapped in any of the filter formats supported by libarchive

Archive::Libarchive

This is the main top-level module for using libarchive from Perl. It is the best place to start reading the documentation. It pulls in the other classes and libarchive constants so that you only need one use statement to effectively use libarchive.

Archive::Libarchive::Archive

The base class of all archive classes. This includes some common error reporting functionality among other things.

Archive::Libarchive::ArchiveRead

This class is used for reading from archives.

Archive::Libarchive::ArchiveWrite

This class is for creating new archives.

Archive::Libarchive::DiskRead

This class is for reading Archive::Libarchive::Entry objects from disk so that they can be written to Archive::Libarchive::ArchiveWrite objects.

Archive::Libarchive::DiskWrite

This class is for writing Archive::Libarchive::Entry objects to disk that have been written from Archive::Libarchive::ArchiveRead objects.

Archive::Libarchive::Entry

This class represents a file in an archive, or on disk.

Archive::Libarchive::EntryLinkResolver

This class exposes the libarchive link resolver API.

Archive::Libarchive::Match

This class exposes the libarchive match API.

Dist::Zilla::Plugin::Libarchive

Build Dist::Zilla based dist tarballs with libarchive instead of the built in Archive::Tar.

Alien::Libarchive3

If a suitable system libarchive can't be found, then this Alien will be installed to provide it.

libarchive.org

The libarchive project home page.

https://github.com/libarchive/libarchive/wiki

The libarchive project wiki.

https://github.com/libarchive/libarchive/wiki/ManualPages

Some of the libarchive man pages are listed here.

AUTHOR

Graham Ollis <plicease@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021,2022 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.