Archive-Libarchive-XS
view release on metacpan or search on metacpan
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
my $status = archive_read_disk_set_uname_lookup($archive, $data, $lookup_callback, $cleanup_callback);
Register a callback for the lookup of UID from user names. In order to deregister call
C<archive_read_disk_setugname_lookup> with both callback functions set to C<undef>.
See L<Archive::Libarchive::XS::Callback> for calling conventions for the lookup and cleanup callbacks.
=cut
#if HAS_archive_read_disk_set_uname_lookup
int
archive_read_disk_set_uname_lookup(archive, data, lookup_callback, cleanup_callback)
struct archive *archive
SV *data
SV *lookup_callback
SV *cleanup_callback
CODE:
if(SvOK(cleanup_callback) || SvOK(lookup_callback))
RETVAL = archive_read_disk_set_uname_lookup(archive, new_lookup_callback(data,lookup_callback,cleanup_callback), &mylookup_read_lookup, &mylookup_cleanup);
else
RETVAL = archive_read_disk_set_uname_lookup(archive, NULL, NULL, NULL);
OUTPUT:
RETVAL
#endif
=head2 archive_write_disk_set_user_lookup
my $status = archive_write_disk_set_user_lookup($archive, $data, $lookup_callback, $cleanup_callback);
Register a callback for the lookup of user names from user id numbers. In order to deregister
call C<archive_write_disk_set_user_lookup> with both callback functions set to C<undef>.
See L<Archive::Libarchive::XS::Callback> for calling conventions for the lookup and cleanup callbacks.
=cut
#if HAS_archive_write_disk_set_user_lookup
int
archive_write_disk_set_user_lookup(archive, data, lookup_callback, cleanup_callback)
struct archive *archive
SV *data
SV *lookup_callback
SV *cleanup_callback
CODE:
if(SvOK(cleanup_callback) || SvOK(lookup_callback))
RETVAL = archive_write_disk_set_user_lookup(archive, new_lookup_callback(data,lookup_callback,cleanup_callback), &mylookup_write_lookup, &mylookup_cleanup);
else
RETVAL = archive_write_disk_set_user_lookup(archive, NULL, NULL, NULL);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_stat
my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $atime, $mtime, $ctime) = archive_entry_stat($entry);
Converts the various fields stored in the archive entry to the format used by L<stat|perlfunc#stat>.
The fields C<$blksize>, C<$blocks> supported by L<stat|perlfunc#stat>, are not supported by this function.
=head2 archive_entry_set_stat
my $status = archive_entry_stat($entry, $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $atime, $mtime, $ctime);
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.
=head2 archive_entry_copy_stat
my $status = archive_entry_stat($entry, $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $atime, $mtime, $ctime);
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>.
=head2 archive_read_open_fh
my $status = archive_read_open_fh($archive, $fh, $block_size);
Like L<#archive_read_open_filename>, except that it accepts a file handle and block
size rather than a filename. Note that the file handle will not be automatically
closed at end-of-archive.
If not specified, a block size of 10240 will be used.
There is no corresponding archive_read_open_fh in the C version of libarchive.
This is provided in the place of C<archive_read_open_FILE> and C<archive_read_open_fd>,
which are not in the Perl bindings for libarchive.
=head2 archive_write_open_fh
my $status = archive_write_open_fh($archive, $fh);
A convenience form of archive_write_open() that accepts a file descriptor. Note
that the file handle will not be automatically closed.
There is no corresponding archive_read_write_fh in the C version of libarchive.
This is provided in the place of C<archive_write_open_FILE> and C<archive_write_open_fd>,
which are not in the Perl bindings for libarchive.
=head2 archive_write_open_memory
my $status = archive_write_open_memory($archive, \\$scalar);
A convenience form of L<#archive_write_open> that accepts a reference to a scalar that will receive the archive.
=head2 archive_read_new
my $archive = archive_read_new();
Allocates and initializes a archive object suitable for reading from an archive.
Returns an opaque archive which may be a perl style object, or a C pointer
(depending on the implementation), either way, it can be passed into
any of the read functions documented here with an C<$archive> argument.
=cut
struct archive *
archive_read_new();
=head2 archive_read_close
my $status = archive_read_close($archive);
Complete the archive and invoke the close callback.
=cut
( run in 0.857 second using v1.01-cache-2.11-cpan-0fb53d1c279 )