ManPageArchiveWriteData3.wiki 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ARCHIVE_WRITE_DATA(3) manual page
  2. == NAME ==
  3. '''archive_write_data''',
  4. '''archive_write_data_block'''
  5. - functions for creating archives
  6. == LIBRARY ==
  7. Streaming Archive Library (libarchive, -larchive)
  8. == SYNOPSIS ==
  9. '''<nowiki>#include <archive.h></nowiki>'''
  10. <br>
  11. ''la_ssize_t''
  12. <br>
  13. '''archive_write_data'''(''struct archive *'', ''const void *'', ''size_t'');
  14. <br>
  15. ''la_ssize_t''
  16. <br>
  17. '''archive_write_data_block'''(''struct archive *'', ''const void *'', ''size_t size'', ''int64_t offset'');
  18. == DESCRIPTION ==
  19. <dl>
  20. <dt>'''archive_write_data'''()</dt><dd>
  21. Write data corresponding to the header just written.
  22. </dd><dt>'''archive_write_data_block'''()</dt><dd>
  23. Write data corresponding to the header just written.
  24. This is like
  25. '''archive_write_data'''()
  26. except that it performs a seek on the file being
  27. written to the specified offset before writing the data.
  28. This is useful when restoring sparse files from archive
  29. formats that support sparse files.
  30. Returns number of bytes written or -1 on error.
  31. (Note: This is currently not supported for
  32. '''archive_write'''
  33. handles, only for
  34. '''archive_write_disk'''
  35. handles.
  36. </dd></dl>
  37. == RETURN VALUES ==
  38. This function returns the number of bytes actually written, or
  39. a negative error code on error.
  40. == ERRORS ==
  41. Detailed error codes and textual descriptions are available from the
  42. '''archive_errno'''()
  43. and
  44. '''archive_error_string'''()
  45. functions.
  46. == BUGS ==
  47. In libarchive 3.x, this function sometimes returns
  48. zero on success instead of returning the number of bytes written.
  49. Specifically, this occurs when writing to an
  50. ''archive_write_disk''
  51. handle.
  52. Clients should treat any value less than zero as an error
  53. and consider any non-negative value as success.
  54. == SEE ALSO ==
  55. [[ManPageBsdtar1]],
  56. [[ManPageArchiveWriteFinishEntry3]],
  57. [[ManPageArchiveWriteSetOptions3]],
  58. [[ManPageLibarchive3]],
  59. [[ManPageCpio5]],
  60. [[ManPageMtree5]],
  61. [[ManPageTar5]]