Matt S Trout > Rakudo-Star-2012.08_001 > Archive::Zip

Download:
Rakudo-Star-2012.08_001.tar.gz

Annotate this POD

Related Modules

Compress::Zlib
Archive::Tar
File::Find
Data::Dumper
Net::FTP
MIME::Lite
File::Basename
CGI::Carp
Digest::MD5
XML::LibXML
more...
By perlmonks.org
Source  

NAME ^

Archive::Zip - Provide an interface to ZIP archive files.

SYNOPSIS ^

    load_bytecode 'Archive/Zip.pbc'

    .local pmc archive
    archive = new ['Archive';'Zip']

    archive.'addFile'('xyz.pl', 'AnotherName.pl')

    archive.'writeToFileNamed'('someZip.zip')

    .local pmc fh
    fh = new 'FileHandle'
    fh.'open'('files.zip', 'wb')
    archive.'writeToFileHandle'(fh, 1)
    fh.'close'()

DESCRIPTION ^

Partial port of Archive::Zip (version 1.30)

See http://search.cpan.org/dist/Archive-Zip/

Class Archive;Zip;Base

Class Archive;Zip;Member

newFromFile( fileName, [ zipName ] )

Construct a new member from the given file. The optional 'zipName' argument sets the internal file name to something different than the given 'fileName'.

Class Archive;Zip;FileMember

Class Archive;Zip;NewFileMember

Class Archive;Zip

zip = new ['Archive';'Zip']

Make a new, empty zip archive.

zip.'addMember' ( member )

Append a member.

zip.'addFile' ( fileName [, newName ] )

Append a member whose data comes from an external file. The optional 'newName' argument sets the internal file name to something different than the given 'fileName'.

zip.'writeToFileNamed' ( fileName )

Write a zip archive to named file. Returns AZ_OK on success.

zip.'writeToFileHandle' ( fileHandle, seekable )

Write a zip archive to a file handle. Returns AZ_OK on success. The second arg tells whether or not to try to seek backwards to re-write headers.

AUTHOR ^

Francois Perrad

syntax highlighting: