Archive-Libarchive-XS
view release on metacpan or search on metacpan
lib/Archive/Libarchive/XS/Function.pod view on Meta::CPAN
my $status = archive_read_disk_entry_from_file($archive, $entry, undef, \@stat);
Populates a struct archive_entry object with information about a particular file. The archive_entry object must have already been created with L<archive_entry_new|Archive::Libarchive::XS::Function#archive_entry_new> and at least one of the
source path or path fields must already be set. (If both are set, the source path will be used.)
Information is read from disk using the path name from the struct archive_entry object. If a file handle ($fh) is provided, some information will be obtained using that file handle, on
platforms that support the appropriate system calls.
Note: The C API supports passing in a stat structure for some performance benefits. Currently this is unsupported in the Perl version, and you must pass undef in as the forth argument,
for possible future compatibility.
Where necessary, user and group ids are converted to user and group names using the currently registered lookup functions above. This affects the file ownership fields and ACL values in the
struct archive_entry object.
=head2 archive_read_disk_gname
my $string = archive_read_disk_gname($archive, $gid);
Returns a group name given a gid value. By default always
returns C<undef>.
=head2 archive_read_disk_new
my $archive = archive_read_disk_new();
Allocates and initializes an archive object suitable for reading object information
from disk.
=head2 archive_read_disk_open
my $status = archive_read_disk_open($archive, $string)
Allocates and initializes an archive object suitable for reading objects from disk.
=head2 archive_read_disk_set_atime_restored
my $status = archive_read_disk_set_atime_restored($archive);
Request that the access time of the entry visited by traversal be restored.
=head2 archive_read_disk_set_behavior
my $status = archive_read_disk_set_behavior($archive, $flags);
Undocumented libarchive function.
=head2 archive_read_disk_set_gname_lookup
my $status = archive_read_disk_set_gname_lookup($archive, $data, $lookup_callback, $cleanup_callback);
Register a callback for the lookup of GID from group names. In order to deregister call
C<archive_read_disk_set_gname_lookup> with both callback functions set to C<undef>.
See L<Archive::Libarchive::XS::Callback> for calling conventions for the lookup and cleanup callbacks.
=head2 archive_read_disk_set_standard_lookup
my $status = archive_read_disk_set_standard_lookup($archive);
This convenience function installs a standard set of user and group name lookup functions.
These functions use C<getpwuid> and C<getgrgid> to convert ids to names, defaulting to C<undef>.
if the names cannot be looked up. These functions also implement a simple memory cache to
reduce the number of calls to C<getpwuid> and C<getgrgid>.
=head2 archive_read_disk_set_symlink_hybrid
my $status = archive_read_disk_set_symlink_hybrid($archive);
This sets the mode used for handling symbolic links. The "hybrid" mode currently
behaves identically to the "logical" mode.
=head2 archive_read_disk_set_symlink_logical
my $status = archive_read_disk_set_symlink_logical($archive);
This sets the mode used for handling symbolic links. The "logical" mode follows
all symbolic links.
=head2 archive_read_disk_set_symlink_physical
my $status = archive_read_disk_set_symlink_physical($archive);
This sets the mode used for handling symbolic links. The "physical" mode does not
follow any symbolic links.
=head2 archive_read_disk_set_uname_lookup
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.
=head2 archive_read_disk_uname
my $string = archive_read_disk_uname($archive, $gid);
Returns a user name given a uid value. By default always
returns C<undef>.
=head2 archive_read_extract
my $status = archive_read_extract($archive, $entry, $flags);
A convenience function that wraps the corresponding archive_write_disk interfaces. The first call to L<archive_read_extract|Archive::Libarchive::XS::Function#archive_read_extract> creates a restore object using L<archive_write_disk_new|Archive::Liba...
L<archive_write_disk_set_standard_lookup|Archive::Libarchive::XS::Function#archive_write_disk_set_standard_lookup>, then transparently invokes L<archive_write_disk_set_options|Archive::Libarchive::XS::Function#archive_write_disk_set_options>, L<archi...
create the entry on disk and copy data into it. The flags argument is passed unmodified to L<archive_write_disk_set_options|Archive::Libarchive::XS::Function#archive_write_disk_set_options>.
=head2 archive_read_extract2
my $status = archive_read_extract2($archive1, $entry, $archive2);
This is another version of archive_read_extract() that allows you to provide your own restore object. In particular, this allows you to override the standard lookup functions using
L<archive_write_disk_set_group_lookup|Archive::Libarchive::XS::Function#archive_write_disk_set_group_lookup>, and L<archive_write_disk_set_user_lookup|Archive::Libarchive::XS::Function#archive_write_disk_set_user_lookup>. Note that L<archive_read_ex...
L<archive_write_disk_set_options|Archive::Libarchive::XS::Function#archive_write_disk_set_options> to set the restore options yourself.
=head2 archive_read_extract_set_skip_file
my $status = archive_read_extract_set_skip_file($archive, $dev, $ino);
Record the dev/ino of a file that will not be written. This is
generally set to the dev/ino of the archive being read.
( run in 1.571 second using v1.01-cache-2.11-cpan-5b529ec07f3 )