Archive-Libarchive-XS
view release on metacpan or search on metacpan
lib/Archive/Libarchive/XS/Function.pod view on Meta::CPAN
returns a negative status value (see $status above) on error or
warning.
=item $callback
A code reference pointing to a Perl callback subroutine. The arguments
that are passed into the callback and the return values expected from
the callback are documented in L<Archive::Libarchive::XS::Callback>.
=item $string
A plain string scalar value.
=item $bool
A boolean value, either 0 or 1 (probably not C<undef> for return values).
=back
If you are linking against an older version of libarchive, some of these
functions may not be available. You can use the C<can> method to test if
a function or constant is available, for example:
if(Archive::Libarchive::XS->can('archive_read_support_filter_grzip')
{
# grzip filter is available.
}
Functions with the prefix C<archive_perl_> are not part of libarchive
and are provided with this module for perl specific needs when operating
with the library.
=head1 FUNCTIONS
=head2 archive_clear_error
my $status = archive_clear_error($archive);
Clears any error information left over from a previous call Not
generally used in client code. Does not return a value.
=head2 archive_copy_error
my $status = archive_copy_error($archive1, $archive2);
Copies error information from one archive to another.
=head2 archive_entry_acl
my $acl = archive_entry_acl($entry);
Return an opaque ACL object.
There's not yet anything you can actually do with this...
=head2 archive_entry_acl_add_entry
my $status = archive_entry_acl_add_entry($entry, $type, $permset, $tag, $qual, $name);
Adds a single ACL entry. For the access ACL and non-extended principals, the classic
UNIX permissions are updated.
=head2 archive_entry_acl_clear
my $status = archive_entry_acl_clear($entry);
removes all ACL entries and resets the enumeration pointer.
=head2 archive_entry_acl_count
my $count = archive_entry_acl_count($entry, $want_type);
counts the ACL entries that have the given type mask.
$type can be the bitwise-or of C<ARCHIVE_ENTRY_ACL_TYPE_ACCESS> and
C<ARCHIVE_ENTRY_ACL_TYPE_DEFAULT>. If C<ARCHIVE_ENTRY_ACL_TYPE_ACCESS>
is included and at least one extended ACL entry is found, the three
non-extended ACLs are added.
=head2 archive_entry_acl_next
my $status = archive_entry_acl_next($entry, $want_type, $type, $permset, $tag, $qual, $name);
return the next entry of the ACL list. This functions may only be called after L<archive_entry_acl_reset|Archive::Libarchive::XS::Function#archive_entry_acl_reset>
has indicated the presence of extended ACL entries.
=head2 archive_entry_acl_reset
my $status = archive_entry_acl_reset($entry, $want_type);
prepare reading the list of ACL entries with
L<archive_entry_acl_next|Archive::Libarchive::XS::Function#archive_entry_acl_next> or L<archive_entry_acl_next_w|Archive::Libarchive::XS::Function#archive_entry_acl_next_w>. The function returns
either 0, if no non-extended ACLs are found. In this case, the access permissions
should be obtained by L<archive_entry_mode|Archive::Libarchive::XS::Function#archive_entry_mode> or set using L<chmod|perlfunc#chmod>.
Otherwise, the function returns the same value as L<archive_entry_acl_count|Archive::Libarchive::XS::Function#archive_entry_acl_count>.
=head2 archive_entry_acl_text
my $string = archive_entry_acl_text($entry, $flags);
converts the ACL entries for the given type mask into a string. In addition to the normal type flags,
C<ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID> and C<ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT> can be specified
to further customize the result. The returned long string is valid until the next call to
L<archive_entry_acl_clear|Archive::Libarchive::XS::Function#archive_entry_acl_clear>, L<archive_entry_acl_add_entry|Archive::Libarchive::XS::Function#archive_entry_acl_add_entry>, L<archive_entry_acl_text|Archive::Libarchive::XS::Function#archive_ent...
=head2 archive_entry_atime
my $atime = archive_entry_atime($entry);
Returns the access time property for the archive entry.
=head2 archive_entry_atime_is_set
my $bool = archive_entry_atime_is_set($entry);
Returns true if the access time property has been set on the archive entry.
=head2 archive_entry_atime_nsec
my $atime = archive_entry_atime_nsec($entry);
Returns the access time (nanoseconds).
lib/Archive/Libarchive/XS/Function.pod view on Meta::CPAN
Converts the various fields in the format used by L<stat|perlfunc#stat> to the fields store in the archive entry.
The fields C<$blksize>, C<$blocks> supported by L<stat|perlfunc#stat>, are not supported by this function.
This is an alias for L<archive_entry_set_stat|Archive::Libarchive::XS::Function#archive_entry_set_stat>.
=head2 archive_entry_ctime
my $ctime = archive_entry_ctime($entry);
Returns the ctime (last time an inode property was changed) property for the archive entry.
=head2 archive_entry_ctime_is_set
my $bool = archive_entry_ctime_is_set($entry);
Returns true if the ctime (last time an inode property was changed) property has been set
on the archive entry.
=head2 archive_entry_ctime_nsec
my $ctime = archive_entry_ctime_nsec($entry);
Returns the ctime (last time an inode property was changed) property (nanoseconds).
=head2 archive_entry_dev
my $device = archive_entry_dev($entry);
Returns the device property for the archive entry.
The device property is an integer identifying the device, and is used by
C<archive_entry_linkify> (along with the ino64 property) to find hardlinks.
=head2 archive_entry_dev_is_set
my $bool = archive_entry_dev_is_set($entry);
Returns true if the device property on the archive entry is set.
The device property is an integer identifying the device, and is used by
C<archive_entry_linkify> (along with the ino64 property) to find hardlinks.
=head2 archive_entry_devmajor
my $device_major = archive_entry_devmajor($entry);
Returns the device major property for the archive entry.
=head2 archive_entry_devminor
my $device_minor = archive_entry_devminor($entry);
Returns the device minor property for the archive entry.
=head2 archive_entry_fflags
my $status = archive_entry_fflags($entry, $set, $clear);
Gets the file flag properties for the archive entry. The
C<$set> and C<$clear> arguments are updated to return their
values.
=head2 archive_entry_fflags_text($entry)
my $string = archive_entry_fflags_text($entry);
Returns the file flags property as a string.
=head2 archive_entry_filetype
my $code = archive_entry_filetype($entry);
Gets the filetype of the archive entry. Code should be one of
=over 4
=item AE_IFMT
=item AE_IFREG
=item AE_IFLNK
=item AE_IFSOCK
=item AE_IFCHR
=item AE_IFBLK
=item AE_IFDIR
=item AE_IFIFO
=back
=head2 archive_entry_free
my $status = archive_entry_free($entry);
Releases the struct archive_entry object.
=head2 archive_entry_gid
my $gid = archive_entry_gid($entry);
Returns the group id property for the archive entry.
=head2 archive_entry_gname
my $string = archive_entry_gname($entry);
Retrieve the gname for the archive entry object.
=head2 archive_entry_hardlink
my $string = archive_entry_hardlink($entry);
Retrieve the hardlink for the archive entry object.
=head2 archive_entry_ino
( run in 1.117 second using v1.01-cache-2.11-cpan-ceb78f64989 )