Archive::Libarchive::DiskWrite - Libarchive disk write class
use 5.020;
use Archive::Libarchive qw( :const );
my $dw = Archive::Libarchive::DiskWrite->new;
$dw->disk_set_options(ARCHIVE_EXTRACT_TIME);
my $text = "Hello World!\n";
my $e = Archive::Libarchive::Entry->new;
$e->set_pathname("hello.txt");
$e->set_filetype('reg');
$e->set_size(length $text);
$e->set_mtime(time);
$e->set_mode(oct('0644'));
$dw->write_header($e);
$dw->write_data(\$text);
$dw->finish_entry;
This class represents an instance for writing from an archive to
disk.
# archive_write_disk_new
my $dw = Archive::Libarchive::DiskWrite->new;
Create a new disk write object.
This is a subset of total list of methods available to all archive
classes. For the full list see "Archive::Libarchive::DiskWrite" in
Archive::Libarchive::API.
# 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::Peek
- Provides an interface for listing and retrieving entries from an archive
without extracting them to the local filesystem.
- 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::API
- This contains the full and complete API for all of the Archive::Libarchive
classes. Because "libarchive" has
hundreds of methods, the main documentation pages elsewhere only contain
enough to be useful, and not to overwhelm.
- 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::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
<http://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.
Graham Ollis <plicease@cpan.org>
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.