summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_read.3
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2004-08-07 19:22:50 +0000
committerkientzle <kientzle@FreeBSD.org>2004-08-07 19:22:50 +0000
commitce43965b8b0a3777d17e84b790b1da388f3da574 (patch)
treeace20a04007ad2459488721ad147fc08b64bd24c /lib/libarchive/archive_read.3
parent42609f208c42763fa511ec4e8a440b74bfd3e0d8 (diff)
downloadFreeBSD-src-ce43965b8b0a3777d17e84b790b1da388f3da574.zip
FreeBSD-src-ce43965b8b0a3777d17e84b790b1da388f3da574.tar.gz
Split archive_{read,write}_finish into separate "close" (finish the archive
and close it) and "finish" (destroy the object) functions. For backwards compat and simplicity, have "finish" invoke "close" transparently if needed. This allows clients to close the archive and check end-of-operation statistics before destroying the object.
Diffstat (limited to 'lib/libarchive/archive_read.3')
-rw-r--r--lib/libarchive/archive_read.310
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libarchive/archive_read.3 b/lib/libarchive/archive_read.3
index 11ec7e8..f42838c 100644
--- a/lib/libarchive/archive_read.3
+++ b/lib/libarchive/archive_read.3
@@ -49,6 +49,7 @@
.Nm archive_read_data_into_fd ,
.Nm archive_read_extract ,
.Nm archive_read_extract_set_progress_callback ,
+.Nm archive_read_close
.Nm archive_read_finish
.Nd functions for reading tar archives
.Sh SYNOPSIS
@@ -95,6 +96,8 @@
.Fn archive_read_extract "struct archive *" "int flags"
.Ft void
.Fn archive_read_extract_set_progress_callback "struct archive *" "void (*func)(void *)" "void *user_data"
+.Ft int
+.Fn archive_read_close "struct archive *"
.Ft void
.Fn archive_read_finish "struct archive *"
.Sh DESCRIPTION
@@ -231,9 +234,12 @@ The progress function will be invoked with the pointer provided to this call.
Generally, the data pointed to should include a reference to the archive
object and the archive_entry object so that various statistics
can be retrieved for the progress display.
+.It Fn archive_read_close
+Complete the archive and invoke the close callback.
.It Fn archive_read_finish
-Complete the archive, invoke the close callback, and release
-all resources.
+Invokes
+.Fn archive_read_close
+if it wasn't invoked maually, then release all resources.
.El
.Pp
Note that the library determines most of the relevant information about
OpenPOWER on IntegriCloud