Blob Blame History Raw
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Mon Sep  3 22:55:06 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p>ARCHIVE_ENTRY(3) BSD Library Functions Manual
ARCHIVE_ENTRY(3)</p>

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:6%;"><b>archive_entry_clear</b>,
<b>archive_entry_clone</b>, <b>archive_entry_free</b>,
<b>archive_entry_new</b>, &mdash; functions for managing
archive entry descriptions</p>

<p style="margin-top: 1em"><b>LIBRARY</b></p>

<p style="margin-left:6%;">Streaming Archive Library
(libarchive, -larchive)</p>

<p style="margin-top: 1em"><b>SYNOPSIS</b></p>

<p style="margin-left:6%;"><b>#include
&lt;archive_entry.h&gt;</b></p>

<p style="margin-left:6%; margin-top: 1em"><i>struct
archive_entry *</i></p>


<p style="margin-left:12%;"><b>archive_entry_clear</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>struct
archive_entry *</i></p>


<p style="margin-left:12%;"><b>archive_entry_clone</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>


<p style="margin-left:12%;"><b>archive_entry_free</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>struct
archive_entry *</i></p>


<p style="margin-left:12%;"><b>archive_entry_new</b>(<i>void</i>);</p>

<p style="margin-top: 1em"><b>DESCRIPTION</b></p>

<p style="margin-left:6%;">These functions create and
manipulate data objects that represent entries within an
archive. You can think of a struct archive_entry as a
heavy-duty version of struct stat: it includes everything
from struct stat plus associated pathname, textual group and
user names, etc. These objects are used by libarchive(3) to
represent the metadata associated with a particular entry in
an archive.</p>

<p style="margin-left:6%; margin-top: 1em"><b>Create and
Destroy</b> <br>
There are functions to allocate, destroy, clear, and copy
<i>archive_entry</i> objects:</p>

<p><b>archive_entry_clear</b>()</p>

<p style="margin-left:17%;">Erases the object, resetting
all internal fields to the same state as a newly-created
object. This is provided to allow you to quickly recycle
objects without thrashing the heap.</p>

<p><b>archive_entry_clone</b>()</p>

<p style="margin-left:17%;">A deep copy operation; all text
fields are duplicated.</p>

<p><b>archive_entry_free</b>()</p>

<p style="margin-left:17%;">Releases the struct
archive_entry object.</p>

<p><b>archive_entry_new</b>()</p>

<p style="margin-left:17%;">Allocate and return a blank
struct archive_entry object.</p>

<p style="margin-left:6%; margin-top: 1em"><b>Function
groups</b> <br>
Due to high number of functions, the accessor functions can
be found in man pages grouped by the purpose.</p>

<p style="margin-top: 1em">archive_entry_acl(3)</p>

<p style="margin-left:37%; margin-top: 1em">Access Control
List manipulation</p>

<p style="margin-top: 1em">archive_entry_paths(3)</p>

<p style="margin-left:37%; margin-top: 1em">Path name
manipulation</p>

<p style="margin-top: 1em">archive_entry_perms(3)</p>

<p style="margin-left:37%; margin-top: 1em">User, group and
mode manipulation</p>

<p style="margin-top: 1em">archive_entry_stat(3)</p>

<p style="margin-left:37%; margin-top: 1em">Functions not
in the other groups and copying to/from <i>struct
stat</i>.</p>

<p style="margin-top: 1em">archive_entry_time(3)</p>

<p style="margin-left:37%; margin-top: 1em">Time field
manipulation</p>

<p style="margin-left:6%; margin-top: 1em">Most of the
functions set or read entries in an object. Such functions
have one of the following forms:</p>

<p><b>archive_entry_set_XXXX</b>()</p>

<p style="margin-left:17%;">Stores the provided data in the
object. In particular, for strings, the pointer is stored,
not the referenced string.</p>

<p><b>archive_entry_copy_XXXX</b>()</p>

<p style="margin-left:17%;">As above, except that the
referenced data is copied into the object.</p>

<p><b>archive_entry_XXXX</b>()</p>

<p style="margin-left:17%;">Returns the specified data. In
the case of strings, a const-qualified pointer to the string
is returned.</p>

<p style="margin-left:6%;">String data can be set or
accessed as wide character strings or normal <i>char</i>
strings. The functions that use wide character strings are
suffixed with <b>_w</b>. Note that these are different
representations of the same data: For example, if you store
a narrow string and read the corresponding wide string, the
object will transparently convert formats using the current
locale. Similarly, if you store a wide string and then store
a narrow string for the same data, the previously-set wide
string will be discarded in favor of the new data.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:6%;">archive_entry_acl(3),
archive_entry_paths(3), archive_entry_perms(3),
archive_entry_time(3) libarchive(3),</p>

<p style="margin-top: 1em"><b>HISTORY</b></p>

<p style="margin-left:6%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3.</p>

<p style="margin-top: 1em"><b>AUTHORS</b></p>

<p style="margin-left:6%;">The <b>libarchive</b> library
was written by Tim Kientzle &lt;kientzle@acm.org&gt;.</p>

<p style="margin-left:6%; margin-top: 1em">BSD
February&nbsp;2, 2012 BSD</p>
<hr>
</body>
</html>