1caf54c4fSMartin Matuska.\" Copyright (c) 2003-2007 Tim Kientzle 2caf54c4fSMartin Matuska.\" All rights reserved. 3caf54c4fSMartin Matuska.\" 4caf54c4fSMartin Matuska.\" Redistribution and use in source and binary forms, with or without 5caf54c4fSMartin Matuska.\" modification, are permitted provided that the following conditions 6caf54c4fSMartin Matuska.\" are met: 7caf54c4fSMartin Matuska.\" 1. Redistributions of source code must retain the above copyright 8caf54c4fSMartin Matuska.\" notice, this list of conditions and the following disclaimer. 9caf54c4fSMartin Matuska.\" 2. Redistributions in binary form must reproduce the above copyright 10caf54c4fSMartin Matuska.\" notice, this list of conditions and the following disclaimer in the 11caf54c4fSMartin Matuska.\" documentation and/or other materials provided with the distribution. 12caf54c4fSMartin Matuska.\" 13caf54c4fSMartin Matuska.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14caf54c4fSMartin Matuska.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15caf54c4fSMartin Matuska.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16caf54c4fSMartin Matuska.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17caf54c4fSMartin Matuska.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18caf54c4fSMartin Matuska.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19caf54c4fSMartin Matuska.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20caf54c4fSMartin Matuska.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21caf54c4fSMartin Matuska.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22caf54c4fSMartin Matuska.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23caf54c4fSMartin Matuska.\" SUCH DAMAGE. 24caf54c4fSMartin Matuska.\" 25*6c22d9efSMartin Matuska.\" $FreeBSD$ 26caf54c4fSMartin Matuska.\" 27caf54c4fSMartin Matuska.Dd May 12, 2008 28caf54c4fSMartin Matuska.Dt archive_entry 3 29caf54c4fSMartin Matuska.Os 30caf54c4fSMartin Matuska.Sh NAME 31caf54c4fSMartin Matuska.Nm archive_entry_acl_add_entry , 32caf54c4fSMartin Matuska.Nm archive_entry_acl_add_entry_w , 33caf54c4fSMartin Matuska.Nm archive_entry_acl_clear , 34caf54c4fSMartin Matuska.Nm archive_entry_acl_count , 35caf54c4fSMartin Matuska.Nm archive_entry_acl_next , 36caf54c4fSMartin Matuska.Nm archive_entry_acl_next_w , 37caf54c4fSMartin Matuska.Nm archive_entry_acl_reset , 38caf54c4fSMartin Matuska.Nm archive_entry_acl_text_w , 39caf54c4fSMartin Matuska.Nm archive_entry_atime , 40caf54c4fSMartin Matuska.Nm archive_entry_atime_nsec , 41caf54c4fSMartin Matuska.Nm archive_entry_clear , 42caf54c4fSMartin Matuska.Nm archive_entry_clone , 43caf54c4fSMartin Matuska.Nm archive_entry_copy_fflags_text , 44caf54c4fSMartin Matuska.Nm archive_entry_copy_fflags_text_w , 45caf54c4fSMartin Matuska.Nm archive_entry_copy_gname , 46caf54c4fSMartin Matuska.Nm archive_entry_copy_gname_w , 47caf54c4fSMartin Matuska.Nm archive_entry_copy_hardlink , 48caf54c4fSMartin Matuska.Nm archive_entry_copy_hardlink_w , 49caf54c4fSMartin Matuska.Nm archive_entry_copy_link , 50caf54c4fSMartin Matuska.Nm archive_entry_copy_link_w , 51caf54c4fSMartin Matuska.Nm archive_entry_copy_pathname_w , 52caf54c4fSMartin Matuska.Nm archive_entry_copy_sourcepath , 53caf54c4fSMartin Matuska.Nm archive_entry_copy_stat , 54caf54c4fSMartin Matuska.Nm archive_entry_copy_symlink , 55caf54c4fSMartin Matuska.Nm archive_entry_copy_symlink_w , 56caf54c4fSMartin Matuska.Nm archive_entry_copy_uname , 57caf54c4fSMartin Matuska.Nm archive_entry_copy_uname_w , 58caf54c4fSMartin Matuska.Nm archive_entry_dev , 59caf54c4fSMartin Matuska.Nm archive_entry_devmajor , 60caf54c4fSMartin Matuska.Nm archive_entry_devminor , 61caf54c4fSMartin Matuska.Nm archive_entry_filetype , 62caf54c4fSMartin Matuska.Nm archive_entry_fflags , 63caf54c4fSMartin Matuska.Nm archive_entry_fflags_text , 64caf54c4fSMartin Matuska.Nm archive_entry_free , 65caf54c4fSMartin Matuska.Nm archive_entry_gid , 66caf54c4fSMartin Matuska.Nm archive_entry_gname , 67caf54c4fSMartin Matuska.Nm archive_entry_hardlink , 68caf54c4fSMartin Matuska.Nm archive_entry_ino , 69caf54c4fSMartin Matuska.Nm archive_entry_mode , 70caf54c4fSMartin Matuska.Nm archive_entry_mtime , 71caf54c4fSMartin Matuska.Nm archive_entry_mtime_nsec , 72caf54c4fSMartin Matuska.Nm archive_entry_nlink , 73caf54c4fSMartin Matuska.Nm archive_entry_new , 74caf54c4fSMartin Matuska.Nm archive_entry_pathname , 75caf54c4fSMartin Matuska.Nm archive_entry_pathname_w , 76caf54c4fSMartin Matuska.Nm archive_entry_rdev , 77caf54c4fSMartin Matuska.Nm archive_entry_rdevmajor , 78caf54c4fSMartin Matuska.Nm archive_entry_rdevminor , 79caf54c4fSMartin Matuska.Nm archive_entry_set_atime , 80caf54c4fSMartin Matuska.Nm archive_entry_set_ctime , 81caf54c4fSMartin Matuska.Nm archive_entry_set_dev , 82caf54c4fSMartin Matuska.Nm archive_entry_set_devmajor , 83caf54c4fSMartin Matuska.Nm archive_entry_set_devminor , 84caf54c4fSMartin Matuska.Nm archive_entry_set_filetype , 85caf54c4fSMartin Matuska.Nm archive_entry_set_fflags , 86caf54c4fSMartin Matuska.Nm archive_entry_set_gid , 87caf54c4fSMartin Matuska.Nm archive_entry_set_gname , 88caf54c4fSMartin Matuska.Nm archive_entry_set_hardlink , 89caf54c4fSMartin Matuska.Nm archive_entry_set_link , 90caf54c4fSMartin Matuska.Nm archive_entry_set_mode , 91caf54c4fSMartin Matuska.Nm archive_entry_set_mtime , 92caf54c4fSMartin Matuska.Nm archive_entry_set_pathname , 93caf54c4fSMartin Matuska.Nm archive_entry_set_rdevmajor , 94caf54c4fSMartin Matuska.Nm archive_entry_set_rdevminor , 95caf54c4fSMartin Matuska.Nm archive_entry_set_size , 96caf54c4fSMartin Matuska.Nm archive_entry_set_symlink , 97caf54c4fSMartin Matuska.Nm archive_entry_set_uid , 98caf54c4fSMartin Matuska.Nm archive_entry_set_uname , 99caf54c4fSMartin Matuska.Nm archive_entry_size , 100caf54c4fSMartin Matuska.Nm archive_entry_sourcepath , 101caf54c4fSMartin Matuska.Nm archive_entry_stat , 102caf54c4fSMartin Matuska.Nm archive_entry_symlink , 103caf54c4fSMartin Matuska.Nm archive_entry_uid , 104caf54c4fSMartin Matuska.Nm archive_entry_uname 105caf54c4fSMartin Matuska.Nd functions for manipulating archive entry descriptions 106caf54c4fSMartin Matuska.Sh SYNOPSIS 107caf54c4fSMartin Matuska.In archive_entry.h 108caf54c4fSMartin Matuska.Ft void 109caf54c4fSMartin Matuska.Fo archive_entry_acl_add_entry 110caf54c4fSMartin Matuska.Fa "struct archive_entry *" 111caf54c4fSMartin Matuska.Fa "int type" 112caf54c4fSMartin Matuska.Fa "int permset" 113caf54c4fSMartin Matuska.Fa "int tag" 114caf54c4fSMartin Matuska.Fa "int qual" 115caf54c4fSMartin Matuska.Fa "const char *name" 116caf54c4fSMartin Matuska.Fc 117caf54c4fSMartin Matuska.Ft void 118caf54c4fSMartin Matuska.Fo archive_entry_acl_add_entry_w 119caf54c4fSMartin Matuska.Fa "struct archive_entry *" 120caf54c4fSMartin Matuska.Fa "int type" 121caf54c4fSMartin Matuska.Fa "int permset" 122caf54c4fSMartin Matuska.Fa "int tag" 123caf54c4fSMartin Matuska.Fa "int qual" 124caf54c4fSMartin Matuska.Fa "const wchar_t *name" 125caf54c4fSMartin Matuska.Fc 126caf54c4fSMartin Matuska.Ft void 127caf54c4fSMartin Matuska.Fn archive_entry_acl_clear "struct archive_entry *" 128caf54c4fSMartin Matuska.Ft int 129caf54c4fSMartin Matuska.Fn archive_entry_acl_count "struct archive_entry *" "int type" 130caf54c4fSMartin Matuska.Ft int 131caf54c4fSMartin Matuska.Fo archive_entry_acl_next 132caf54c4fSMartin Matuska.Fa "struct archive_entry *" 133caf54c4fSMartin Matuska.Fa "int want_type" 134caf54c4fSMartin Matuska.Fa "int *type" 135caf54c4fSMartin Matuska.Fa "int *permset" 136caf54c4fSMartin Matuska.Fa "int *tag" 137caf54c4fSMartin Matuska.Fa "int *qual" 138caf54c4fSMartin Matuska.Fa "const char **name" 139caf54c4fSMartin Matuska.Fc 140caf54c4fSMartin Matuska.Ft int 141caf54c4fSMartin Matuska.Fo archive_entry_acl_next_w 142caf54c4fSMartin Matuska.Fa "struct archive_entry *" 143caf54c4fSMartin Matuska.Fa "int want_type" 144caf54c4fSMartin Matuska.Fa "int *type" 145caf54c4fSMartin Matuska.Fa "int *permset" 146caf54c4fSMartin Matuska.Fa "int *tag" 147caf54c4fSMartin Matuska.Fa "int *qual" 148caf54c4fSMartin Matuska.Fa "const wchar_t **name" 149caf54c4fSMartin Matuska.Fc 150caf54c4fSMartin Matuska.Ft int 151caf54c4fSMartin Matuska.Fn archive_entry_acl_reset "struct archive_entry *" "int want_type" 152caf54c4fSMartin Matuska.Ft const wchar_t * 153caf54c4fSMartin Matuska.Fn archive_entry_acl_text_w "struct archive_entry *" "int flags" 154caf54c4fSMartin Matuska.Ft time_t 155caf54c4fSMartin Matuska.Fn archive_entry_atime "struct archive_entry *" 156caf54c4fSMartin Matuska.Ft long 157caf54c4fSMartin Matuska.Fn archive_entry_atime_nsec "struct archive_entry *" 158caf54c4fSMartin Matuska.Ft "struct archive_entry *" 159caf54c4fSMartin Matuska.Fn archive_entry_clear "struct archive_entry *" 160caf54c4fSMartin Matuska.Ft struct archive_entry * 161caf54c4fSMartin Matuska.Fn archive_entry_clone "struct archive_entry *" 162caf54c4fSMartin Matuska.Ft const char * * 163caf54c4fSMartin Matuska.Fn archive_entry_copy_fflags_text_w "struct archive_entry *" "const char *" 164caf54c4fSMartin Matuska.Ft const wchar_t * 165caf54c4fSMartin Matuska.Fn archive_entry_copy_fflags_text_w "struct archive_entry *" "const wchar_t *" 166caf54c4fSMartin Matuska.Ft void 167caf54c4fSMartin Matuska.Fn archive_entry_copy_gname "struct archive_entry *" "const char *" 168caf54c4fSMartin Matuska.Ft void 169caf54c4fSMartin Matuska.Fn archive_entry_copy_gname_w "struct archive_entry *" "const wchar_t *" 170caf54c4fSMartin Matuska.Ft void 171caf54c4fSMartin Matuska.Fn archive_entry_copy_hardlink "struct archive_entry *" "const char *" 172caf54c4fSMartin Matuska.Ft void 173caf54c4fSMartin Matuska.Fn archive_entry_copy_hardlink_w "struct archive_entry *" "const wchar_t *" 174caf54c4fSMartin Matuska.Ft void 175caf54c4fSMartin Matuska.Fn archive_entry_copy_sourcepath "struct archive_entry *" "const char *" 176caf54c4fSMartin Matuska.Ft void 177caf54c4fSMartin Matuska.Fn archive_entry_copy_pathname_w "struct archive_entry *" "const wchar_t *" 178caf54c4fSMartin Matuska.Ft void 179caf54c4fSMartin Matuska.Fn archive_entry_copy_stat "struct archive_entry *" "const struct stat *" 180caf54c4fSMartin Matuska.Ft void 181caf54c4fSMartin Matuska.Fn archive_entry_copy_symlink "struct archive_entry *" "const char *" 182caf54c4fSMartin Matuska.Ft void 183caf54c4fSMartin Matuska.Fn archive_entry_copy_symlink_w "struct archive_entry *" "const wchar_t *" 184caf54c4fSMartin Matuska.Ft void 185caf54c4fSMartin Matuska.Fn archive_entry_copy_uname "struct archive_entry *" "const char *" 186caf54c4fSMartin Matuska.Ft void 187caf54c4fSMartin Matuska.Fn archive_entry_copy_uname_w "struct archive_entry *" "const wchar_t *" 188caf54c4fSMartin Matuska.Ft dev_t 189caf54c4fSMartin Matuska.Fn archive_entry_dev "struct archive_entry *" 190caf54c4fSMartin Matuska.Ft dev_t 191caf54c4fSMartin Matuska.Fn archive_entry_devmajor "struct archive_entry *" 192caf54c4fSMartin Matuska.Ft dev_t 193caf54c4fSMartin Matuska.Fn archive_entry_devminor "struct archive_entry *" 194caf54c4fSMartin Matuska.Ft mode_t 195caf54c4fSMartin Matuska.Fn archive_entry_filetype "struct archive_entry *" 196caf54c4fSMartin Matuska.Ft void 197caf54c4fSMartin Matuska.Fo archive_entry_fflags 198caf54c4fSMartin Matuska.Fa "struct archive_entry *" 199caf54c4fSMartin Matuska.Fa "unsigned long *set" 200caf54c4fSMartin Matuska.Fa "unsigned long *clear" 201caf54c4fSMartin Matuska.Fc 202caf54c4fSMartin Matuska.Ft const char * 203caf54c4fSMartin Matuska.Fn archive_entry_fflags_text "struct archive_entry *" 204caf54c4fSMartin Matuska.Ft void 205caf54c4fSMartin Matuska.Fn archive_entry_free "struct archive_entry *" 206caf54c4fSMartin Matuska.Ft const char * 207caf54c4fSMartin Matuska.Fn archive_entry_gname "struct archive_entry *" 208caf54c4fSMartin Matuska.Ft const char * 209caf54c4fSMartin Matuska.Fn archive_entry_hardlink "struct archive_entry *" 210caf54c4fSMartin Matuska.Ft ino_t 211caf54c4fSMartin Matuska.Fn archive_entry_ino "struct archive_entry *" 212caf54c4fSMartin Matuska.Ft mode_t 213caf54c4fSMartin Matuska.Fn archive_entry_mode "struct archive_entry *" 214caf54c4fSMartin Matuska.Ft time_t 215caf54c4fSMartin Matuska.Fn archive_entry_mtime "struct archive_entry *" 216caf54c4fSMartin Matuska.Ft long 217caf54c4fSMartin Matuska.Fn archive_entry_mtime_nsec "struct archive_entry *" 218caf54c4fSMartin Matuska.Ft unsigned int 219caf54c4fSMartin Matuska.Fn archive_entry_nlink "struct archive_entry *" 220caf54c4fSMartin Matuska.Ft struct archive_entry * 221caf54c4fSMartin Matuska.Fn archive_entry_new "void" 222caf54c4fSMartin Matuska.Ft const char * 223caf54c4fSMartin Matuska.Fn archive_entry_pathname "struct archive_entry *" 224caf54c4fSMartin Matuska.Ft const wchar_t * 225caf54c4fSMartin Matuska.Fn archive_entry_pathname_w "struct archive_entry *" 226caf54c4fSMartin Matuska.Ft dev_t 227caf54c4fSMartin Matuska.Fn archive_entry_rdev "struct archive_entry *" 228caf54c4fSMartin Matuska.Ft dev_t 229caf54c4fSMartin Matuska.Fn archive_entry_rdevmajor "struct archive_entry *" 230caf54c4fSMartin Matuska.Ft dev_t 231caf54c4fSMartin Matuska.Fn archive_entry_rdevminor "struct archive_entry *" 232caf54c4fSMartin Matuska.Ft void 233caf54c4fSMartin Matuska.Fn archive_entry_set_dev "struct archive_entry *" "dev_t" 234caf54c4fSMartin Matuska.Ft void 235caf54c4fSMartin Matuska.Fn archive_entry_set_devmajor "struct archive_entry *" "dev_t" 236caf54c4fSMartin Matuska.Ft void 237caf54c4fSMartin Matuska.Fn archive_entry_set_devminor "struct archive_entry *" "dev_t" 238caf54c4fSMartin Matuska.Ft void 239caf54c4fSMartin Matuska.Fn archive_entry_set_filetype "struct archive_entry *" "unsigned int" 240caf54c4fSMartin Matuska.Ft void 241caf54c4fSMartin Matuska.Fo archive_entry_set_fflags 242caf54c4fSMartin Matuska.Fa "struct archive_entry *" 243caf54c4fSMartin Matuska.Fa "unsigned long set" 244caf54c4fSMartin Matuska.Fa "unsigned long clear" 245caf54c4fSMartin Matuska.Fc 246caf54c4fSMartin Matuska.Ft void 247caf54c4fSMartin Matuska.Fn archive_entry_set_gid "struct archive_entry *" "gid_t" 248caf54c4fSMartin Matuska.Ft void 249caf54c4fSMartin Matuska.Fn archive_entry_set_gname "struct archive_entry *" "const char *" 250caf54c4fSMartin Matuska.Ft void 251caf54c4fSMartin Matuska.Fn archive_entry_set_hardlink "struct archive_entry *" "const char *" 252caf54c4fSMartin Matuska.Ft void 253caf54c4fSMartin Matuska.Fn archive_entry_set_ino "struct archive_entry *" "unsigned long" 254caf54c4fSMartin Matuska.Ft void 255caf54c4fSMartin Matuska.Fn archive_entry_set_link "struct archive_entry *" "const char *" 256caf54c4fSMartin Matuska.Ft void 257caf54c4fSMartin Matuska.Fn archive_entry_set_mode "struct archive_entry *" "mode_t" 258caf54c4fSMartin Matuska.Ft void 259caf54c4fSMartin Matuska.Fn archive_entry_set_mtime "struct archive_entry *" "time_t" "long nanos" 260caf54c4fSMartin Matuska.Ft void 261caf54c4fSMartin Matuska.Fn archive_entry_set_nlink "struct archive_entry *" "unsigned int" 262caf54c4fSMartin Matuska.Ft void 263caf54c4fSMartin Matuska.Fn archive_entry_set_pathname "struct archive_entry *" "const char *" 264caf54c4fSMartin Matuska.Ft void 265caf54c4fSMartin Matuska.Fn archive_entry_set_rdev "struct archive_entry *" "dev_t" 266caf54c4fSMartin Matuska.Ft void 267caf54c4fSMartin Matuska.Fn archive_entry_set_rdevmajor "struct archive_entry *" "dev_t" 268caf54c4fSMartin Matuska.Ft void 269caf54c4fSMartin Matuska.Fn archive_entry_set_rdevminor "struct archive_entry *" "dev_t" 270caf54c4fSMartin Matuska.Ft void 271caf54c4fSMartin Matuska.Fn archive_entry_set_size "struct archive_entry *" "int64_t" 272caf54c4fSMartin Matuska.Ft void 273caf54c4fSMartin Matuska.Fn archive_entry_set_symlink "struct archive_entry *" "const char *" 274caf54c4fSMartin Matuska.Ft void 275caf54c4fSMartin Matuska.Fn archive_entry_set_uid "struct archive_entry *" "uid_t" 276caf54c4fSMartin Matuska.Ft void 277caf54c4fSMartin Matuska.Fn archive_entry_set_uname "struct archive_entry *" "const char *" 278caf54c4fSMartin Matuska.Ft int64_t 279caf54c4fSMartin Matuska.Fn archive_entry_size "struct archive_entry *" 280caf54c4fSMartin Matuska.Ft const char * 281caf54c4fSMartin Matuska.Fn archive_entry_sourcepath "struct archive_entry *" 282caf54c4fSMartin Matuska.Ft const struct stat * 283caf54c4fSMartin Matuska.Fn archive_entry_stat "struct archive_entry *" 284caf54c4fSMartin Matuska.Ft const char * 285caf54c4fSMartin Matuska.Fn archive_entry_symlink "struct archive_entry *" 286caf54c4fSMartin Matuska.Ft const char * 287caf54c4fSMartin Matuska.Fn archive_entry_uname "struct archive_entry *" 288caf54c4fSMartin Matuska.Sh DESCRIPTION 289caf54c4fSMartin MatuskaThese functions create and manipulate data objects that 290caf54c4fSMartin Matuskarepresent entries within an archive. 291caf54c4fSMartin MatuskaYou can think of a 292caf54c4fSMartin Matuska.Tn struct archive_entry 293caf54c4fSMartin Matuskaas a heavy-duty version of 294caf54c4fSMartin Matuska.Tn struct stat : 295caf54c4fSMartin Matuskait includes everything from 296caf54c4fSMartin Matuska.Tn struct stat 297caf54c4fSMartin Matuskaplus associated pathname, textual group and user names, etc. 298caf54c4fSMartin MatuskaThese objects are used by 299caf54c4fSMartin Matuska.Xr libarchive 3 300caf54c4fSMartin Matuskato represent the metadata associated with a particular 301caf54c4fSMartin Matuskaentry in an archive. 302caf54c4fSMartin Matuska.Ss Create and Destroy 303caf54c4fSMartin MatuskaThere are functions to allocate, destroy, clear, and copy 304caf54c4fSMartin Matuska.Va archive_entry 305caf54c4fSMartin Matuskaobjects: 306caf54c4fSMartin Matuska.Bl -tag -compact -width indent 307caf54c4fSMartin Matuska.It Fn archive_entry_clear 308caf54c4fSMartin MatuskaErases the object, resetting all internal fields to the 309caf54c4fSMartin Matuskasame state as a newly-created object. 310caf54c4fSMartin MatuskaThis is provided to allow you to quickly recycle objects 311caf54c4fSMartin Matuskawithout thrashing the heap. 312caf54c4fSMartin Matuska.It Fn archive_entry_clone 313caf54c4fSMartin MatuskaA deep copy operation; all text fields are duplicated. 314caf54c4fSMartin Matuska.It Fn archive_entry_free 315caf54c4fSMartin MatuskaReleases the 316caf54c4fSMartin Matuska.Tn struct archive_entry 317caf54c4fSMartin Matuskaobject. 318caf54c4fSMartin Matuska.It Fn archive_entry_new 319caf54c4fSMartin MatuskaAllocate and return a blank 320caf54c4fSMartin Matuska.Tn struct archive_entry 321caf54c4fSMartin Matuskaobject. 322caf54c4fSMartin Matuska.El 323caf54c4fSMartin Matuska.Ss Set and Get Functions 324caf54c4fSMartin MatuskaMost of the functions here set or read entries in an object. 325caf54c4fSMartin MatuskaSuch functions have one of the following forms: 326caf54c4fSMartin Matuska.Bl -tag -compact -width indent 327caf54c4fSMartin Matuska.It Fn archive_entry_set_XXXX 328caf54c4fSMartin MatuskaStores the provided data in the object. 329caf54c4fSMartin MatuskaIn particular, for strings, the pointer is stored, 330caf54c4fSMartin Matuskanot the referenced string. 331caf54c4fSMartin Matuska.It Fn archive_entry_copy_XXXX 332caf54c4fSMartin MatuskaAs above, except that the referenced data is copied 333caf54c4fSMartin Matuskainto the object. 334caf54c4fSMartin Matuska.It Fn archive_entry_XXXX 335caf54c4fSMartin MatuskaReturns the specified data. 336caf54c4fSMartin MatuskaIn the case of strings, a const-qualified pointer to 337caf54c4fSMartin Matuskathe string is returned. 338caf54c4fSMartin Matuska.El 339caf54c4fSMartin MatuskaString data can be set or accessed as wide character strings 340caf54c4fSMartin Matuskaor normal 341caf54c4fSMartin Matuska.Va char 342caf54c4fSMartin Matuskastrings. 343caf54c4fSMartin MatuskaThe functions that use wide character strings are suffixed with 344caf54c4fSMartin Matuska.Cm _w . 345caf54c4fSMartin MatuskaNote that these are different representations of the same data: 346caf54c4fSMartin MatuskaFor example, if you store a narrow string and read the corresponding 347caf54c4fSMartin Matuskawide string, the object will transparently convert formats 348caf54c4fSMartin Matuskausing the current locale. 349caf54c4fSMartin MatuskaSimilarly, if you store a wide string and then store a 350caf54c4fSMartin Matuskanarrow string for the same data, the previously-set wide string will 351caf54c4fSMartin Matuskabe discarded in favor of the new data. 352caf54c4fSMartin Matuska.Pp 353caf54c4fSMartin MatuskaThere are a few set/get functions that merit additional description: 354caf54c4fSMartin Matuska.Bl -tag -compact -width indent 355caf54c4fSMartin Matuska.It Fn archive_entry_set_link 356caf54c4fSMartin MatuskaThis function sets the symlink field if it is already set. 357caf54c4fSMartin MatuskaOtherwise, it sets the hardlink field. 358caf54c4fSMartin Matuska.El 359caf54c4fSMartin Matuska.Ss File Flags 360caf54c4fSMartin MatuskaFile flags are transparently converted between a bitmap 361caf54c4fSMartin Matuskarepresentation and a textual format. 362caf54c4fSMartin MatuskaFor example, if you set the bitmap and ask for text, the library 363caf54c4fSMartin Matuskawill build a canonical text format. 364caf54c4fSMartin MatuskaHowever, if you set a text format and request a text format, 365caf54c4fSMartin Matuskayou will get back the same text, even if it is ill-formed. 366caf54c4fSMartin MatuskaIf you need to canonicalize a textual flags string, you should first set the 367caf54c4fSMartin Matuskatext form, then request the bitmap form, then use that to set the bitmap form. 368caf54c4fSMartin MatuskaSetting the bitmap format will clear the internal text representation 369caf54c4fSMartin Matuskaand force it to be reconstructed when you next request the text form. 370caf54c4fSMartin Matuska.Pp 371caf54c4fSMartin MatuskaThe bitmap format consists of two integers, one containing bits 372caf54c4fSMartin Matuskathat should be set, the other specifying bits that should be 373caf54c4fSMartin Matuskacleared. 374caf54c4fSMartin MatuskaBits not mentioned in either bitmap will be ignored. 375caf54c4fSMartin MatuskaUsually, the bitmap of bits to be cleared will be set to zero. 376caf54c4fSMartin MatuskaIn unusual circumstances, you can force a fully-specified set 377caf54c4fSMartin Matuskaof file flags by setting the bitmap of flags to clear to the complement 378caf54c4fSMartin Matuskaof the bitmap of flags to set. 379caf54c4fSMartin Matuska(This differs from 380caf54c4fSMartin Matuska.Xr fflagstostr 3 , 381caf54c4fSMartin Matuskawhich only includes names for set bits.) 382caf54c4fSMartin MatuskaConverting a bitmap to a textual string is a platform-specific 383caf54c4fSMartin Matuskaoperation; bits that are not meaningful on the current platform 384caf54c4fSMartin Matuskawill be ignored. 385caf54c4fSMartin Matuska.Pp 386caf54c4fSMartin MatuskaThe canonical text format is a comma-separated list of flag names. 387caf54c4fSMartin MatuskaThe 388caf54c4fSMartin Matuska.Fn archive_entry_copy_fflags_text 389caf54c4fSMartin Matuskaand 390caf54c4fSMartin Matuska.Fn archive_entry_copy_fflags_text_w 391caf54c4fSMartin Matuskafunctions parse the provided text and sets the internal bitmap values. 392caf54c4fSMartin MatuskaThis is a platform-specific operation; names that are not meaningful 393caf54c4fSMartin Matuskaon the current platform will be ignored. 394caf54c4fSMartin MatuskaThe function returns a pointer to the start of the first name that was not 395caf54c4fSMartin Matuskarecognized, or NULL if every name was recognized. 396caf54c4fSMartin MatuskaNote that every name--including names that follow an unrecognized name--will 397caf54c4fSMartin Matuskabe evaluated, and the bitmaps will be set to reflect every name that is 398caf54c4fSMartin Matuskarecognized. 399caf54c4fSMartin Matuska(In particular, this differs from 400caf54c4fSMartin Matuska.Xr strtofflags 3 , 401caf54c4fSMartin Matuskawhich stops parsing at the first unrecognized name.) 402caf54c4fSMartin Matuska.Ss ACL Handling 403caf54c4fSMartin MatuskaXXX This needs serious help. 404caf54c4fSMartin MatuskaXXX 405caf54c4fSMartin Matuska.Pp 406caf54c4fSMartin MatuskaAn 407caf54c4fSMartin Matuska.Dq Access Control List 408caf54c4fSMartin Matuska(ACL) is a list of permissions that grant access to particular users or 409caf54c4fSMartin Matuskagroups beyond what would normally be provided by standard POSIX mode bits. 410caf54c4fSMartin MatuskaThe ACL handling here addresses some deficiencies in the POSIX.1e draft 17 ACL 411caf54c4fSMartin Matuskaspecification. 412caf54c4fSMartin MatuskaIn particular, POSIX.1e draft 17 specifies several different formats, but 413caf54c4fSMartin Matuskanone of those formats include both textual user/group names and numeric 414caf54c4fSMartin MatuskaUIDs/GIDs. 415caf54c4fSMartin Matuska.Pp 416caf54c4fSMartin MatuskaXXX explain ACL stuff XXX 417caf54c4fSMartin Matuska.\" .Sh EXAMPLE 418caf54c4fSMartin Matuska.\" .Sh RETURN VALUES 419caf54c4fSMartin Matuska.\" .Sh ERRORS 420caf54c4fSMartin Matuska.Sh SEE ALSO 421caf54c4fSMartin Matuska.Xr archive 3 422caf54c4fSMartin Matuska.Sh HISTORY 423caf54c4fSMartin MatuskaThe 424caf54c4fSMartin Matuska.Nm libarchive 425caf54c4fSMartin Matuskalibrary first appeared in 426caf54c4fSMartin Matuska.Fx 5.3 . 427caf54c4fSMartin Matuska.Sh AUTHORS 428caf54c4fSMartin Matuska.An -nosplit 429caf54c4fSMartin MatuskaThe 430caf54c4fSMartin Matuska.Nm libarchive 431caf54c4fSMartin Matuskalibrary was written by 432caf54c4fSMartin Matuska.An Tim Kientzle Aq kientzle@acm.org . 433caf54c4fSMartin Matuska.\" .Sh BUGS 434