archive_read_finish(3)

archive_read_finish3

Functions for reading streaming archives

Part of archive_read_free(3).

Usage

#include <archive.h>

int

archive_read_close(struct archive *);

int

archive_read_finish(struct archive *);

int

archive_read_free(struct archive *);

Library

Streaming Archive Library (libarchive, -larchive)

Overview

archive_read_close()

Complete the archive and invoke the close callback.

archive_read_finish()

This is a deprecated synonym for archive_read_free(). The new name was introduced with libarchive 3.0. Applications that need to compile with either libarchive 2 or libarchive 3 should continue to use the archive_read_finish() name. Both names will be supported until libarchive 4.0 is released, which is not expected to occur earlier than 2013.

archive_read_free()

Invokes archive_read_close() if it was not invoked manually, then releases all resources. Note: In libarchive 1.x, this function was declared to return void, which made it impossible to detect certain errors when archive_read_close() was invoked implicitly from this function. The declaration is corrected beginning with libarchive 2.0.

Return values

These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL.

Errors

Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions.

Releases

52 releases since FreeBSD 5.3-RELEASE; the text changed 28 times.

  1. 5.3
  2. 5.4
  3. 5.5
  4. 6.0–6.1
  5. 6.2
  6. 6.3
  7. 6.4
  8. 7.0
  9. 7.1
  10. 7.2
  11. 7.3
  12. 7.4
  13. 8.0
  14. 8.1
  15. 8.2
  16. 8.3
  17. 8.4
  18. 9.0
  19. 9.1
  20. 9.2
  21. 9.3
  22. 10.0–11.3
  23. 11.4
  24. 12.0–12.1
  25. 12.2–13.3
  26. 13.4–13.5
  27. 14.0
  28. 14.1–15.1
  29. 16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.