Skip to content

azawawi/perl6-libzip

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
t
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Perl 6 bindings for libzip

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

  • Other 100.0%