|  |  
 |   |   
 NAMEArchive::Libarchive::Entry - Libarchive entry class VERSIONversion 0.09 SYNOPSIS use 5.020;
 use Archive::Libarchive;
 
 my $text = "Hello World!\n";
 
 my $e = Archive::Libarchive::Entry->new;
 $e->set_pathname("hello.txt");
 $e->set_filetype('reg');
 $e->set_size(length $text);
 $e->set_mtime(time);
 $e->set_mode(oct('0644'));
DESCRIPTIONThis class represents an entry, which is file metadata for a file stored in an archive or on the local file system. CONSTRUCTORThis is a subset of total list of methods available to all archive classes. For the full list see "Archive::Libarchive::Entry" in Archive::Libarchive::API. newmy $e = Archive::Libarchive::Entry->new; Create a new Entry object. METHODSThis is a subset of total list of methods available to all archive classes. For the full list see "Archive::Libarchive::Entry" in Archive::Libarchive::API. filetype# archive_entry_filetype my $code = $e->filetype; This returns the type of file for the entry. This will be a dualvar where the string is one of "mt", "reg", "lnx", "sock", "chr", "blk", "dir" or "ifo", and integer values will match the corresponding "AE_IF" prefixed constant. See "CONSTANTS" in Archive::Libarchive::API for the full list. set_filetype# archive_entry_set_filetype $e->set_filetype($code); This sets the type of the file for the entry. This will accept either a string value which is one of "mt", "reg", "lnx", "sock", "chr", "blk", "dir" or "ifo", or an integer constant value with the "AE_IF" prefix. See "CONSTANTS" in Archive::Libarchive::API for the full list. digest# archive_entry_digest my $string = $e->digest($type); This is used to query the raw hex digest for the given entry. The type of digest is provided as an argument. The type may be passed in as either a string or an integer constant. The constant prefix is "ARCHIVE_ENTRY_DIGEST_". So for an MD5 digest you could pass in either 'md5' or "ARCHIVE_ENTRY_DIGEST_MD5". xattr_add_entry# archive_entry_xattr_add_entry my $int = $e->xattr_add_entry($name, $value); Adds an xattr name/value pair. xattr_next# archive_entry_xattr_next my $int = $e->xattr_next(\$name, $value); Fetches the next xattr name/value pair. copy_stat# archive_entry_copy_stat $e->copy_stat($stat); Copies the values from a FFI::C::Stat instance. Not currently implemented on Windows. stat# archive_entry_stat my $stat = $e->stat; Returns a FFI::C::Stat instance filled out from the entry metadata. Not currently implemented on Windows. clone# archive_entry_clone my $e2 = $e->clone; Clone the entry instance. copy_mac_metadata# archive_entry_copy_mac_metadata $e->copy_mac_metadata($meta); Sets the mac metadata to $meta. mac_metadata# archive_entry_mac_metadata my $meta = $e->mac_metadata; Get the mac metadata from the entry. SEE ALSO
 AUTHORGraham Ollis <plicease@cpan.org> COPYRIGHT AND LICENSEThis software is copyright (c) 2021,2022 by Graham Ollis. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. 
 
 |