Manpages - archive_util.3

Streaming Archive Library (libarchive, -larchive)

These functions provide access to various information about the

object used in the

library.

Clears any error information left over from a previous call. Not generally used in client code.

Synonym for

Synonym for

Copies error information from one archive to another.

Returns a numeric error code (see

indicating the reason for the most recent error return. Note that this can not be reliably used to detect whether an error has occurred. It should be used only after another libarchive function has returned an error status.

Returns a textual error message suitable for display. The error message here is usually more specific than that obtained from passing the result of

to

Returns a count of the number of files processed by this archive object. The count is incremented by calls to

or

Returns a numeric code identifying the indicated filter. See

for details of the numbering.

Returns the number of filters in the current pipeline. For read archive handles, these filters are added automatically by the automatic format detection. For write archive handles, these filters are added by calls to the various

functions. Filters in the resulting pipeline are numbered so that filter 0 is the filter closest to the format handler. As a convenience, functions that expect a filter number will accept -1 as a synonym for the highest-numbered filter.

For example, when reading a uuencoded gzipped tar archive, there are three filters: filter 0 is the gunzip filter, filter 1 is the uudecode filter, and filter 2 is the pseudo-filter that wraps the archive read functions. In this case, requesting

would be a synonym for

which would return the number of bytes currently read from the archive, while

would return the number of bytes after uudecoding, and

would return the number of bytes after decompression.

Returns a textual name identifying the indicated filter. See

for details of the numbering.

Returns a numeric code indicating the format of the current archive entry. This value is set by a successful call to

Note that it is common for this value to change from entry to entry. For example, a tar archive might have several entries that utilize GNU tar extensions and several entries that do not. These entries will have different format codes.

A textual description of the format of the current entry.

Returns the number of bytes read from or written to the indicated filter. In particular,

returns the number of bytes read or written by the format handler, while

returns the number of bytes read or written to the archive. See

for details of the numbering here.

Sets the numeric error code and error description that will be returned by

and

This function should be used within I/O callbacks to set system-specific error codes and error descriptions. This function accepts a printf-like format string and arguments. However, you should be careful to use only the following printf format specifiers:

Field-width specifiers and other printf features are not uniformly supported and should not be used.

The

library first appeared in

The

library was written by

Author: dt

Created: 2022-02-20 Sun 15:05