Archive::Zip::MemberRead man page on OpenServer

Man page or keyword search:  
man Server   5388 pages
apropos Keyword Search (all sections)
Output format
OpenServer logo
[printable version]

Archive::Zip::MemberReUser)Contributed Perl DocumenArchive::Zip::MemberRead(3)

NAME
       Archive::Zip::MemberRead - A wrapper that lets you read Zip archive
       members as if they were files.

SYNOPSIS
	 use Archive::Zip;
	 use Archive::Zip::MemberRead;
	 $zip = new Archive::Zip("file.zip");
	 $fh  = new Archive::Zip::MemberRead($zip, "subdir/abc.txt");
	 while (defined($line = $fh->getline()))
	 {
	     print $fh->input_line_number . "#: $line\n";
	 }

	 $read = $fh->read($buffer, 32*1024);
	 print "Read $read bytes as :$buffer:\n";

DESCRIPTION
       The Archive::Zip::MemberRead module lets you read Zip archive member
       data just like you read data from files.

METHODS
       Archive::Zip::Member::readFileHandle()
	   You can get a "Archive::Zip::MemberRead" from an archive member by
	   calling "readFileHandle()":

	     my $member = $zip->memberNamed('abc/def.c');
	     my $fh = $member->readFileHandle();
	     while (defined($line = $fh->getline()))
	     {
		     # ...
	     }
	     $fh->close();

       Archive::Zip::MemberRead->new($zip, $fileName)
       Archive::Zip::MemberRead->new($zip, $member)
       Archive::Zip::MemberRead->new($member)
	   Construct a new Archive::Zip::MemberRead on the specified member.

	     my $fh = Archive::Zip::MemberRead->new($zip, 'fred.c')

       rewind()
	   Rewinds an "Archive::Zip::MemberRead" so that you can read from it
	   again starting at the beginning.

       input_line_number()
	   Returns the current line number, but only if you're using "get-
	   line()".  Using "read()" will not update the line number.

       close()
	   Closes the given file handle.

       buffer_size([ $size ])
	   Gets or sets the buffer size used for reads.	 Default is the chunk
	   size used by Archive::Zip.

       getline()
	   Returns the next line from the currently open member.  Makes sense
	   only for text files.	 A read error is considered fatal enough to
	   die.	 Returns undef on eof. All subsequent calls would return
	   undef, unless a rewind() is called.	Note: The line returned has
	   the newline removed.

       read($buffer, $num_bytes_to_read)
	   Simulates a normal "read()" system call.  Returns the no. of bytes
	   read. "undef" on error, 0 on eof, e.g.:

	     $fh = new Archive::Zip::MemberRead($zip, "sreeji/secrets.bin");
	     while (1)
	     {
	       $read = $fh->read($buffer, 1024);
	       die "FATAL ERROR reading my secrets !\n" if (!defined($read));
	       last if (!$read);
	       # Do processing.
	       ....
	      }

AUTHOR
       Sreeji K. Das, <sreeji_k@yahoo.com> See Archive::Zip by Ned Konz with-
       out which this module does not make any sense!

       Minor mods by Ned Konz.

COPYRIGHT
       Copyright (c) 2002 Sreeji K. Das. All rights reserved.  This program is
       free software; you can redistribute it and/or modify it under the same
       terms as Perl itself.

perl v5.8.8			  2007-06-05	   Archive::Zip::MemberRead(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OpenServer

List of man pages available for OpenServer

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net