Archive::Raw - Perl bindings to the libarchive library
libarchive is a multi-format archive and compression library. This module provides Perl bindings to the libarchive API.
WARNING: The API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog).
use Archive::Raw;
# Extract 'archive.tar.gz' to 'out/'
my $reader = Archive::Raw::Reader->new();
$reader->open_filename ('archive.tar.gz');
my $writer = Archive::Raw::DiskWriter->new (
Archive::Raw->EXTRACT_TIME | Archive::Raw->EXTRACT_PERM |
Archive::Raw->EXTRACT_ACL | Archive::Raw->EXTRACT_FFLAGS);
my $extractPath = "out";
while (my $entry = $reader->next())
{
my $filename = $extractPath.'/'.$entry->pathname;
$entry->pathname ($filename);
$writer->write ($entry);
}
Get the libarchive version.
Jacques Germishuys <[email protected]>
Copyright 2019 Jacques Germishuys.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.