Archive-Libarchive
view release on metacpan or search on metacpan
lib/Archive/Libarchive.pm view on Meta::CPAN
$ffi->mangler(undef);
$ffi->attach( archive_bzlib_version => [] => 'string' );
$ffi->attach( archive_liblz4_version => [] => 'string' );
$ffi->attach( archive_liblzma_version => [] => 'string' );
$ffi->attach( archive_version_details => [] => 'string' );
$ffi->attach( archive_version_number => [] => 'int' );
$ffi->attach( archive_version_string => [] => 'string' );
$ffi->attach( archive_zlib_version => [] => 'string' );
$ffi->ignore_not_found(1);
$ffi->attach( archive_libzstd_version => [] => 'string' );
$ffi->ignore_not_found(0);
sub versions ($class)
{
my %v = (
bzlib => archive_bzlib_version() // 'undef',
liblz4 => archive_liblz4_version() // 'undef',
liblzma => archive_liblzma_version() // 'undef',
libarchive => archive_version_string() // 'undef',
zlib => archive_zlib_version() // 'undef',
lib/Archive/Libarchive/Entry.pm view on Meta::CPAN
$ffi->attach( [ free => 'DESTROY' ] => ['archive_entry'] => sub {
my($xsub, $self) = @_;
return if $self->{owner} # owned by another object
|| ${^GLOBAL_PHASE} eq 'DESTRUCT'; # during global shutdown the xsub might go away
$xsub->($self);
});
#$ffi->attach( [ free => 'DESTROY' ] => ['archive_entry'] => 'void' );
$ffi->ignore_not_found(1);
$ffi->attach_cast(_digest_type_to_int => archive_entry_digest_t => 'int' );
my @size = (
undef,
16,
20,
20,
32,
48,
64,
);
$ffi->attach( digest => ['archive_entry', 'archive_entry_digest_t'] => 'opaque' => sub {
my($xsub, $self, $type) = @_;
my $size = $size[_digest_type_to_int($type)];
my $ptr = $xsub->($self, $type);
buffer_to_scalar($ptr, $size);
});
$ffi->ignore_not_found(0);
require Archive::Libarchive::Lib::Entry unless $Archive::Libarchive::no_gen;
1;
__END__
=pod
lib/Archive/Libarchive/Lib/ArchiveRead.pm view on Meta::CPAN
$ffi->attach( support_format_mtree => ['archive_read'] => 'int' );
$ffi->attach( support_format_rar => ['archive_read'] => 'int' );
$ffi->attach( support_format_raw => ['archive_read'] => 'int' );
$ffi->attach( support_format_tar => ['archive_read'] => 'int' );
$ffi->attach( support_format_warc => ['archive_read'] => 'int' );
$ffi->attach( support_format_xar => ['archive_read'] => 'int' );
$ffi->attach( support_format_zip => ['archive_read'] => 'int' );
$ffi->attach( support_format_zip_seekable => ['archive_read'] => 'int' );
$ffi->attach( support_format_zip_streamable => ['archive_read'] => 'int' );
$ffi->ignore_not_found(1);
$ffi->attach( support_filter_by_code => ['archive_read', 'int'] => 'int' );
$ffi->attach( support_filter_zstd => ['archive_read'] => 'int' );
$ffi->attach( support_format_rar5 => ['archive_read'] => 'int' );
$ffi->ignore_not_found(0);
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
lib/Archive/Libarchive/Lib/ArchiveWrite.pm view on Meta::CPAN
$ffi->attach( set_format_warc => ['archive_write'] => 'int' );
$ffi->attach( set_format_xar => ['archive_write'] => 'int' );
$ffi->attach( set_format_zip => ['archive_write'] => 'int' );
$ffi->attach( set_option => ['archive_write', 'string', 'string', 'string'] => 'int' );
$ffi->attach( set_options => ['archive_write', 'string'] => 'int' );
$ffi->attach( set_passphrase => ['archive_write', 'string'] => 'int' );
$ffi->attach( set_skip_file => ['archive_write', 'sint64', 'sint64'] => 'int' );
$ffi->attach( zip_set_compression_deflate => ['archive_write'] => 'int' );
$ffi->attach( zip_set_compression_store => ['archive_write'] => 'int' );
$ffi->ignore_not_found(1);
$ffi->attach( add_filter_zstd => ['archive_write'] => 'int' );
#$ffi->attach( open2 => ['archive_write', 'opaque', undef, undef, undef, undef] => 'int' );
$ffi->attach( set_format_cpio_bin => ['archive_write'] => 'int' );
$ffi->attach( set_format_cpio_odc => ['archive_write'] => 'int' );
$ffi->attach( set_format_cpio_pwb => ['archive_write'] => 'int' );
$ffi->ignore_not_found(0);
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
lib/Archive/Libarchive/Lib/Entry.pm view on Meta::CPAN
$ffi->attach( update_gname_utf8 => ['archive_entry', 'string'] => 'int' );
$ffi->attach( update_hardlink_utf8 => ['archive_entry', 'string'] => 'int' );
$ffi->attach( update_link_utf8 => ['archive_entry', 'string'] => 'int' );
$ffi->attach( update_pathname_utf8 => ['archive_entry', 'string'] => 'int' );
$ffi->attach( update_symlink_utf8 => ['archive_entry', 'string'] => 'int' );
$ffi->attach( update_uname_utf8 => ['archive_entry', 'string'] => 'int' );
$ffi->attach( xattr_clear => ['archive_entry'] );
$ffi->attach( xattr_count => ['archive_entry'] => 'int' );
$ffi->attach( xattr_reset => ['archive_entry'] => 'int' );
$ffi->ignore_not_found(1);
$ffi->attach( acl_from_text => ['archive_entry', 'string', 'int'] => 'int' );
$ffi->attach( acl_from_text_w => ['archive_entry', 'wstring', 'int'] => 'int' );
$ffi->attach( acl_to_text => ['archive_entry', 'ssize_t*', 'int'] => 'string' );
$ffi->attach( acl_to_text_w => ['archive_entry', 'ssize_t*', 'int'] => 'wstring' );
$ffi->attach( acl_types => ['archive_entry'] => 'int' );
$ffi->attach( filetype_is_set => ['archive_entry'] => 'int' );
$ffi->attach( gid_is_set => ['archive_entry'] => 'int' );
$ffi->attach( perm_is_set => ['archive_entry'] => 'int' );
$ffi->attach( set_symlink_type => ['archive_entry', 'int'] );
$ffi->attach( symlink_type => ['archive_entry'] => 'int' );
$ffi->attach( uid_is_set => ['archive_entry'] => 'int' );
$ffi->ignore_not_found(0);
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
lib/Archive/Libarchive/Lib/Match.pm view on Meta::CPAN
$ffi->attach( include_uid => ['archive_match', 'sint64'] => 'int' );
$ffi->attach( include_uname => ['archive_match', 'string'] => 'int' );
$ffi->attach( include_uname_w => ['archive_match', 'wstring'] => 'int' );
$ffi->attach( owner_excluded => ['archive_match', 'archive_entry'] => 'int' );
$ffi->attach( path_excluded => ['archive_match', 'archive_entry'] => 'int' );
$ffi->attach( path_unmatched_inclusions => ['archive_match'] => 'int' );
$ffi->attach( path_unmatched_inclusions_next => ['archive_match', 'string*'] => 'int' );
#$ffi->attach( path_unmatched_inclusions_next_w => ['archive_match', undef] => 'int' );
$ffi->attach( time_excluded => ['archive_match', 'archive_entry'] => 'int' );
$ffi->ignore_not_found(1);
$ffi->attach( set_inclusion_recursion => ['archive_match', 'int'] => 'int' );
$ffi->ignore_not_found(0);
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
maint/tt/Code.pm.tt view on Meta::CPAN
my $ffi = Archive::Libarchive::Lib->ffi;
[% IF bindings.size > 0 -%]
[% FOREACH binding IN bindings.required -%]
[% INCLUDE binding.tt binding = binding -%]
[% END -%]
[% END -%]
[% IF bindings.optional.size > 0 -%]
$ffi->ignore_not_found(1);
[% FOREACH binding IN bindings.optional -%]
[% INCLUDE binding.tt binding = binding -%]
[% END -%]
$ffi->ignore_not_found(0);
[% END -%]
1;
__END__
[% INCLUDE seealso.tt -%]
( run in 0.806 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )