Perl 6 bindings for libzip
Other
Switch branches/tags
Nothing to show
Latest commit 6425dab Apr 25, 2017 @azawawi committed on GitHub Merge pull request #1 from zoffixznet/patch-1
Use modern META filename
Permalink
Failed to load latest commit information.
examples
lib add-buffer is replaced by add-blob. Reduce type because of a rakudobr… Mar 13, 2016
t Nearly there Mar 12, 2016
.gitignore Add initial project structure Mar 7, 2016
.travis.yml Use 2016.04 for CI Apr 22, 2016
LICENSE Add initial project structure Mar 7, 2016
META6.json Use modern META filename Apr 25, 2017
README.md Simplify CI badges Apr 22, 2016
appveyor.yml Use 2016.04 for CI Apr 22, 2016

README.md

LibZip

Build Status Build status

LibZip provides Perl 6 bindings for libzip

This is an experimental module at the moment.

Example

use v6;

use lib 'lib';
use LibZip;

# Remove the old one (just in case)
my $zip-file-name = "test.zip";
$zip-file-name.IO.unlink;

# Create a new LibZip instance
my $archive = LibZip.new;

# Create a new zip file
$archive.open($zip-file-name);

# Add file to zip archive
$archive.add-file("README.md");

# Add file to zip archive
my $lorem = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum.";
my Blob $blob = $lorem.encode("UTF-8");
$archive.add-blob("lorem.txt", $blob);

# Close the zip archive
$archive.close;

Author

Ahmad M. Zawawi, azawawi on #perl6, https://github.com/azawawi/

License

MIT License