archive_entry.3.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!-- Creator : groff version 1.22.4 -->
  2. <!-- CreationDate: Tue Jul 18 07:11:02 2023 -->
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  4. "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta name="generator" content="groff -Thtml, see www.gnu.org">
  8. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  9. <meta name="Content-Style" content="text/css">
  10. <style type="text/css">
  11. p { margin-top: 0; margin-bottom: 0; vertical-align: top }
  12. pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
  13. table { margin-top: 0; margin-bottom: 0; vertical-align: top }
  14. h1 { text-align: center }
  15. </style>
  16. <title></title>
  17. </head>
  18. <body>
  19. <hr>
  20. <p>ARCHIVE_ENTRY(3) BSD Library Functions Manual
  21. ARCHIVE_ENTRY(3)</p>
  22. <p style="margin-top: 1em"><b>NAME</b></p>
  23. <p style="margin-left:6%;"><b>archive_entry_clear</b>,
  24. <b>archive_entry_clone</b>, <b>archive_entry_free</b>,
  25. <b>archive_entry_new</b> &mdash; functions for managing
  26. archive entry descriptions</p>
  27. <p style="margin-top: 1em"><b>LIBRARY</b></p>
  28. <p style="margin-left:6%;">Streaming Archive Library
  29. (libarchive, -larchive)</p>
  30. <p style="margin-top: 1em"><b>SYNOPSIS</b></p>
  31. <p style="margin-left:6%;"><b>#include
  32. &lt;archive_entry.h&gt;</b></p>
  33. <p style="margin-left:6%; margin-top: 1em"><i>struct
  34. archive_entry *</i></p>
  35. <p style="margin-left:12%;"><b>archive_entry_clear</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>
  36. <p style="margin-left:6%; margin-top: 1em"><i>struct
  37. archive_entry *</i></p>
  38. <p style="margin-left:12%;"><b>archive_entry_clone</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>
  39. <p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
  40. <p style="margin-left:12%;"><b>archive_entry_free</b>(<i>struct&nbsp;archive_entry&nbsp;*</i>);</p>
  41. <p style="margin-left:6%; margin-top: 1em"><i>struct
  42. archive_entry *</i></p>
  43. <p style="margin-left:12%;"><b>archive_entry_new</b>(<i>void</i>);</p>
  44. <p style="margin-top: 1em"><b>DESCRIPTION</b></p>
  45. <p style="margin-left:6%;">These functions create and
  46. manipulate data objects that represent entries within an
  47. archive. You can think of a struct archive_entry as a
  48. heavy-duty version of struct stat: it includes everything
  49. from struct stat plus associated pathname, textual group and
  50. user names, etc. These objects are used by libarchive(3) to
  51. represent the metadata associated with a particular entry in
  52. an archive.</p>
  53. <p style="margin-left:6%; margin-top: 1em"><b>Create and
  54. Destroy</b> <br>
  55. There are functions to allocate, destroy, clear, and copy
  56. <i>archive_entry</i> objects:</p>
  57. <p><b>archive_entry_clear</b>()</p>
  58. <p style="margin-left:17%;">Erases the object, resetting
  59. all internal fields to the same state as a newly-created
  60. object. This is provided to allow you to quickly recycle
  61. objects without thrashing the heap.</p>
  62. <p><b>archive_entry_clone</b>()</p>
  63. <p style="margin-left:17%;">A deep copy operation; all text
  64. fields are duplicated.</p>
  65. <p><b>archive_entry_free</b>()</p>
  66. <p style="margin-left:17%;">Releases the struct
  67. archive_entry object.</p>
  68. <p><b>archive_entry_new</b>()</p>
  69. <p style="margin-left:17%;">Allocate and return a blank
  70. struct archive_entry object.</p>
  71. <p style="margin-left:6%; margin-top: 1em"><b>Function
  72. groups</b> <br>
  73. Due to high number of functions, the accessor functions can
  74. be found in man pages grouped by the purpose.</p>
  75. <p style="margin-top: 1em">archive_entry_acl(3)</p>
  76. <p style="margin-left:37%; margin-top: 1em">Access Control
  77. List manipulation</p>
  78. <p style="margin-top: 1em">archive_entry_paths(3)</p>
  79. <p style="margin-left:37%; margin-top: 1em">Path name
  80. manipulation</p>
  81. <p style="margin-top: 1em">archive_entry_perms(3)</p>
  82. <p style="margin-left:37%; margin-top: 1em">User, group and
  83. mode manipulation</p>
  84. <p style="margin-top: 1em">archive_entry_stat(3)</p>
  85. <p style="margin-left:37%; margin-top: 1em">Functions not
  86. in the other groups and copying to/from <i>struct
  87. stat</i>.</p>
  88. <p style="margin-top: 1em">archive_entry_time(3)</p>
  89. <p style="margin-left:37%; margin-top: 1em">Time field
  90. manipulation</p>
  91. <p style="margin-left:6%; margin-top: 1em">Most of the
  92. functions set or read entries in an object. Such functions
  93. have one of the following forms:</p>
  94. <p><b>archive_entry_set_XXXX</b>()</p>
  95. <p style="margin-left:17%;">Stores the provided data in the
  96. object. In particular, for strings, the pointer is stored,
  97. not the referenced string.</p>
  98. <p><b>archive_entry_copy_XXXX</b>()</p>
  99. <p style="margin-left:17%;">As above, except that the
  100. referenced data is copied into the object.</p>
  101. <p><b>archive_entry_XXXX</b>()</p>
  102. <p style="margin-left:17%;">Returns the specified data. In
  103. the case of strings, a const-qualified pointer to the string
  104. is returned.</p>
  105. <p style="margin-left:6%;">String data can be set or
  106. accessed as wide character strings or normal <i>char</i>
  107. strings. The functions that use wide character strings are
  108. suffixed with <b>_w</b>. Note that these are different
  109. representations of the same data: For example, if you store
  110. a narrow string and read the corresponding wide string, the
  111. object will transparently convert formats using the current
  112. locale. Similarly, if you store a wide string and then store
  113. a narrow string for the same data, the previously-set wide
  114. string will be discarded in favor of the new data.</p>
  115. <p style="margin-top: 1em"><b>SEE ALSO</b></p>
  116. <p style="margin-left:6%;">archive_entry_acl(3),
  117. archive_entry_paths(3), archive_entry_perms(3),
  118. archive_entry_time(3), libarchive(3)</p>
  119. <p style="margin-top: 1em"><b>HISTORY</b></p>
  120. <p style="margin-left:6%;">The <b>libarchive</b> library
  121. first appeared in FreeBSD&nbsp;5.3.</p>
  122. <p style="margin-top: 1em"><b>AUTHORS</b></p>
  123. <p style="margin-left:6%;">The <b>libarchive</b> library
  124. was written by Tim Kientzle &lt;[email protected]&gt;.</p>
  125. <p style="margin-left:6%; margin-top: 1em">BSD
  126. February&nbsp;2, 2012 BSD</p>
  127. <hr>
  128. </body>
  129. </html>