archive_write_format.3 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. .\" Copyright (c) 2003-2011 Tim Kientzle
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\" notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\" notice, this list of conditions and the following disclaimer in the
  11. .\" documentation and/or other materials provided with the distribution.
  12. .\"
  13. .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  14. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  15. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  16. .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  17. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  18. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  19. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  20. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  21. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  22. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. .\" SUCH DAMAGE.
  24. .\"
  25. .\" $FreeBSD$
  26. .\"
  27. .Dd February 14, 2013
  28. .Dt ARCHIVE_WRITE_FORMAT 3
  29. .Os
  30. .Sh NAME
  31. .Nm archive_write_set_format_cpio ,
  32. .Nm archive_write_set_format_pax ,
  33. .Nm archive_write_set_format_pax_restricted ,
  34. .Nm archive_write_set_format_raw ,
  35. .Nm archive_write_set_format_shar ,
  36. .Nm archive_write_set_format_shar_dump ,
  37. .Nm archive_write_set_format_ustar
  38. .Nd functions for creating archives
  39. .Sh LIBRARY
  40. Streaming Archive Library (libarchive, -larchive)
  41. .Sh SYNOPSIS
  42. .In archive.h
  43. .Ft int
  44. .Fn archive_write_set_format_cpio "struct archive *"
  45. .Ft int
  46. .Fn archive_write_set_format_pax "struct archive *"
  47. .Ft int
  48. .Fn archive_write_set_format_pax_restricted "struct archive *"
  49. .Ft int
  50. .Fn archive_write_set_format_raw "struct archive *"
  51. .Ft int
  52. .Fn archive_write_set_format_shar "struct archive *"
  53. .Ft int
  54. .Fn archive_write_set_format_shar_dump "struct archive *"
  55. .Ft int
  56. .Fn archive_write_set_format_ustar "struct archive *"
  57. .Sh DESCRIPTION
  58. These functions set the format that will be used for the archive.
  59. .Pp
  60. The library can write
  61. POSIX octet-oriented cpio format archives,
  62. POSIX-standard
  63. .Dq pax interchange
  64. format archives,
  65. traditional
  66. .Dq shar
  67. archives,
  68. enhanced
  69. .Dq dump
  70. shar archives that store a variety of file attributes and handle binary files,
  71. and
  72. POSIX-standard
  73. .Dq ustar
  74. archives.
  75. The pax interchange format is a backwards-compatible tar format that
  76. adds key/value attributes to each entry and supports arbitrary
  77. filenames, linknames, uids, sizes, etc.
  78. .Dq Restricted pax interchange format
  79. is the library default; this is the same as pax format, but suppresses
  80. the pax extended header for most normal files.
  81. In most cases, this will result in ordinary ustar archives.
  82. .\"
  83. .Sh RETURN VALUES
  84. These functions return
  85. .Cm ARCHIVE_OK
  86. on success, or
  87. .Cm ARCHIVE_FATAL .
  88. .\"
  89. .Sh ERRORS
  90. Detailed error codes and textual descriptions are available from the
  91. .Fn archive_errno
  92. and
  93. .Fn archive_error_string
  94. functions.
  95. .\"
  96. .Sh SEE ALSO
  97. .Xr tar 1 ,
  98. .Xr libarchive 3 ,
  99. .Xr archive_write 3 ,
  100. .Xr archive_write_set_options 3 ,
  101. .Xr cpio 5 ,
  102. .Xr mtree 5 ,
  103. .Xr tar 5