summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2011-03-20 08:21:25 +0000
committerespie <espie@openbsd.org>2011-03-20 08:21:25 +0000
commit006c96dcee60ea31496b64143c6ca9fbc2d62661 (patch)
tree229bb03648b2ecff4e7106684db5b8f53a64237c
parentpass url name to Ustar, for error messages (diff)
downloadwireguard-openbsd-006c96dcee60ea31496b64143c6ca9fbc2d62661.tar.xz
wireguard-openbsd-006c96dcee60ea31496b64143c6ca9fbc2d62661.zip
document new stuff
-rw-r--r--usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod b/usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod
index ac04a8234c5..7ea3f519043 100644
--- a/usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod
+++ b/usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod
@@ -1,4 +1,4 @@
-$OpenBSD: OpenBSD::Ustar.pod,v 1.17 2011/01/02 14:49:49 espie Exp $
+$OpenBSD: OpenBSD::Ustar.pod,v 1.18 2011/03/20 08:21:25 espie Exp $
=head1 NAME
@@ -11,6 +11,7 @@ OpenBSD::Ustar - simple access to Ustar C<tar(1)> archives
open(my $in, "<", $arcnameforreading) or die;
$rdarc = OpenBSD::Ustar->new($in, $state, $destdir);
+ $rdarc->set_description($arcnameforreading);
while (my $o = $rdarc->next) {
# decide whether we want to extract it, change object attributes
$o->create;
@@ -90,6 +91,10 @@ Actual extraction is performed through C<$o-E<gt>create> and is not
mandatory. Thus, client code can control whether it wants to extract archive
elements or not.
+In case of errors, the archive will call C<$state-E<gt>fatal> with a suitable
+error message that contains the last index name processed. The user may
+set an optional archive description with C<set_description>.
+
The C<create> method can take an optional C<$callback> argument, which will
be called regularly while extracting large objects, as C<&$callback($donesize)>,
with C<$donesize> the number of bytes already extracted.