Archive-Zip
view release on metacpan or search on metacpan
lib/Archive/Zip.pm view on Meta::CPAN
Gets or sets the field from the member header. These are
C<FA_*> values.
=item versionNeededToExtract()
Gets the field from the member header.
=item bitFlag()
Gets the general purpose bit field from the member header.
This is where the C<GPBF_*> bits live.
=item compressionMethod()
Returns the member compression method. This is the method
that is currently being used to compress the member data.
This will be COMPRESSION_STORED for added string or file
members, or any of the C<COMPRESSION_*> values for members
from a zip file. However, this module can only handle members
whose data is in COMPRESSION_STORED or COMPRESSION_DEFLATED
format.
=item desiredCompressionMethod( [ $method ] )
=item desiredCompressionMethod( [ { compressionMethod => $method } ] )
Get or set the member's C<desiredCompressionMethod>. This is
the compression method that will be used when the member is
written. Returns prior desiredCompressionMethod. Only
COMPRESSION_DEFLATED or COMPRESSION_STORED are valid
arguments. Changing to COMPRESSION_STORED will change the
member desiredCompressionLevel to 0; changing to
COMPRESSION_DEFLATED will change the member
desiredCompressionLevel to COMPRESSION_LEVEL_DEFAULT.
=item desiredCompressionLevel( [ $level ] )
=item desiredCompressionLevel( [ { compressionLevel => $level } ] )
Get or set the member's desiredCompressionLevel This is the
method that will be used to write. Returns prior
desiredCompressionLevel. Valid arguments are 0 through 9,
COMPRESSION_LEVEL_NONE, COMPRESSION_LEVEL_DEFAULT,
COMPRESSION_LEVEL_BEST_COMPRESSION, and
COMPRESSION_LEVEL_FASTEST. 0 or COMPRESSION_LEVEL_NONE will
change the desiredCompressionMethod to COMPRESSION_STORED.
All other arguments will change the desiredCompressionMethod
to COMPRESSION_DEFLATED.
=item externalFileName()
Return the member's external file name, if any, or undef.
=item fileName()
Get or set the member's internal filename. Returns the
(possibly new) filename. Names will have backslashes
converted to forward slashes, and will have multiple
consecutive slashes converted to single ones.
=item lastModFileDateTime()
Return the member's last modification date/time stamp in
MS-DOS format.
=item lastModTime()
Return the member's last modification date/time stamp,
converted to unix localtime format.
print "Mod Time: " . scalar( localtime( $member->lastModTime() ) );
=item setLastModFileDateTimeFromUnix()
Set the member's lastModFileDateTime from the given unix
time.
$member->setLastModFileDateTimeFromUnix( time() );
=item internalFileAttributes()
Return the internal file attributes field from the zip
header. This is only set for members read from a zip file.
=item externalFileAttributes()
Return member attributes as read from the ZIP file. Note that
these are NOT UNIX!
=item unixFileAttributes( [ $newAttributes ] )
=item unixFileAttributes( [ { attributes => $newAttributes } ] )
Get or set the member's file attributes using UNIX file
attributes. Returns old attributes.
my $oldAttribs = $member->unixFileAttributes( 0666 );
Note that the return value has more than just the file
permissions, so you will have to mask off the lowest bits for
comparisons.
=item localExtraField( [ $newField ] )
=item localExtraField( [ { field => $newField } ] )
Gets or sets the extra field that was read from the local
header. The extra field must be in the proper format. If it is
not or if the new field contains data related to the zip64
format, this method does not modify the extra field and returns
AZ_FORMAT_ERROR, otherwise it returns AZ_OK.
=item cdExtraField( [ $newField ] )
=item cdExtraField( [ { field => $newField } ] )
Gets or sets the extra field that was read from the central
directory header. The extra field must be in the proper format.
If it is not or if the new field contains data related to the
zip64 format, this method does not modify the extra field and
returns AZ_FORMAT_ERROR, otherwise it returns AZ_OK.
=item extraFields()
Return both local and CD extra fields, concatenated.
=item fileComment( [ $newComment ] )
=item fileComment( [ { comment => $newComment } ] )
Get or set the member's file comment.
=item hasDataDescriptor()
Get or set the data descriptor flag. If this is set, the
local header will not necessarily have the correct data
sizes. Instead, a small structure will be stored at the end
of the member data with these values. This should be
( run in 0.801 second using v1.01-cache-2.11-cpan-39bf76dae61 )