ManPageArchiveEntry3.wiki 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ARCHIVE_ENTRY(3) manual page
  2. == NAME ==
  3. '''archive_entry_clear''',
  4. '''archive_entry_clone''',
  5. '''archive_entry_free''',
  6. '''archive_entry_new'''
  7. - functions for managing archive entry descriptions
  8. == LIBRARY ==
  9. Streaming Archive Library (libarchive, -larchive)
  10. == SYNOPSIS ==
  11. '''<nowiki>#include <archive_entry.h></nowiki>'''
  12. <br>
  13. ''struct archive_entry *''
  14. <br>
  15. '''archive_entry_clear'''(''struct archive_entry *'');
  16. <br>
  17. ''struct archive_entry *''
  18. <br>
  19. '''archive_entry_clone'''(''struct archive_entry *'');
  20. <br>
  21. ''void''
  22. <br>
  23. '''archive_entry_free'''(''struct archive_entry *'');
  24. <br>
  25. ''struct archive_entry *''
  26. <br>
  27. '''archive_entry_new'''(''void'');
  28. == DESCRIPTION ==
  29. These functions create and manipulate data objects that
  30. represent entries within an archive.
  31. You can think of a
  32. '''struct archive_entry'''
  33. as a heavy-duty version of
  34. '''struct stat :'''
  35. it includes everything from
  36. '''struct stat'''
  37. plus associated pathname, textual group and user names, etc.
  38. These objects are used by
  39. [[ManPageLibarchive3]]
  40. to represent the metadata associated with a particular
  41. entry in an archive.
  42. === Create and Destroy===
  43. There are functions to allocate, destroy, clear, and copy
  44. ''archive_entry''
  45. objects:
  46. <dl>
  47. <dt>'''archive_entry_clear'''()</dt><dd>
  48. Erases the object, resetting all internal fields to the
  49. same state as a newly-created object.
  50. This is provided to allow you to quickly recycle objects
  51. without thrashing the heap.
  52. </dd><dt>'''archive_entry_clone'''()</dt><dd>
  53. A deep copy operation; all text fields are duplicated.
  54. </dd><dt>'''archive_entry_free'''()</dt><dd>
  55. Releases the
  56. '''struct archive_entry'''
  57. object.
  58. </dd><dt>'''archive_entry_new'''()</dt><dd>
  59. Allocate and return a blank
  60. '''struct archive_entry'''
  61. object.
  62. </dd></dl>
  63. === Function groups===
  64. Due to high number of functions, the accessor functions can be found in
  65. man pages grouped by the purpose.
  66. <dl>
  67. <dt>[[ManPageArchiveEntryAcl3]]</dt><dd>
  68. Access Control List manipulation
  69. </dd><dt>[[ManPageArchiveEntryPaths3]]</dt><dd>
  70. Path name manipulation
  71. </dd><dt>[[ManPageArchiveEntryPerms3]]</dt><dd>
  72. User, group and mode manipulation
  73. </dd><dt>[[ManPageArchiveEntryStat3]]</dt><dd>
  74. Functions not in the other groups and copying to/from
  75. ''struct'' stat.
  76. </dd><dt>[[ManPageArchiveEntryTime3]]</dt><dd>
  77. Time field manipulation
  78. </dd></dl>
  79. Most of the functions set or read entries in an object.
  80. Such functions have one of the following forms:
  81. <dl>
  82. <dt>'''archive_entry_set_XXXX'''()</dt><dd>
  83. Stores the provided data in the object.
  84. In particular, for strings, the pointer is stored,
  85. not the referenced string.
  86. </dd><dt>'''archive_entry_copy_XXXX'''()</dt><dd>
  87. As above, except that the referenced data is copied
  88. into the object.
  89. </dd><dt>'''archive_entry_XXXX'''()</dt><dd>
  90. Returns the specified data.
  91. In the case of strings, a const-qualified pointer to
  92. the string is returned.
  93. </dd></dl>
  94. String data can be set or accessed as wide character strings
  95. or normal
  96. ''char''
  97. strings.
  98. The functions that use wide character strings are suffixed with
  99. '''_w'''.
  100. Note that these are different representations of the same data:
  101. For example, if you store a narrow string and read the corresponding
  102. wide string, the object will transparently convert formats
  103. using the current locale.
  104. Similarly, if you store a wide string and then store a
  105. narrow string for the same data, the previously-set wide string will
  106. be discarded in favor of the new data.
  107. == SEE ALSO ==
  108. [[ManPageArchiveEntryAcl3]],
  109. [[ManPageArchiveEntryPaths3]],
  110. [[ManPageArchiveEntryPerms3]],
  111. [[ManPageArchiveEntryTime3]],
  112. [[ManPageLibarchive3]]
  113. == HISTORY ==
  114. The
  115. '''libarchive'''
  116. library first appeared in
  117. FreeBSD 5.3.
  118. == AUTHORS ==
  119. The
  120. '''libarchive'''
  121. library was written by
  122. Tim Kientzle &lt;[email protected].&gt;