archive_entry_set_pathname(3)

archive_entry_set_pathname3

Functions for manipulating path names in archive entry descriptions

Part of archive_entry_paths(3).

Usage

#include <archive_entry.h>

const char *

archive_entry_hardlink(struct archive_entry *a);

const wchar_t *

archive_entry_hardlink_w(struct archive_entry *a);

void

archive_entry_set_hardlink(struct archive_entry *a, const char *path);

void

archive_entry_copy_hardlink(struct archive_entry *a, const char *path);

void

archive_entry_copy_hardlink_w(struct archive_entry *a, const wchar_t *path);

int

archive_entry_update_hardlink_utf8(struct archive_entry *a, const char *path);

void

archive_entry_set_link(struct archive_entry *a, const char *path);

void

archive_entry_copy_link(struct archive_entry *a, const char *path);

void

archive_entry_copy_link_w(struct archive_entry *a, const wchar_t *path);

int

archive_entry_update_link_utf8(struct archive_entry *a, const char *path);

const char *

archive_entry_pathname(struct archive_entry *a);

const wchar_t *

archive_entry_pathname_w(struct archive_entry *a);

void

archive_entry_set_pathname(struct archive_entry *a, const char *path);

void

archive_entry_copy_pathname(struct archive_entry *a, const char *path);

void

archive_entry_copy_pathname_w(struct archive_entry *a, const wchar_t *path);

int

archive_entry_update_pathname_utf8(struct archive_entry *a, const char *path);

const char *

archive_entry_sourcepath(struct archive_entry *a);

void

archive_entry_copy_sourcepath(struct archive_entry *a, const char *path);

const char *

archive_entry_symlink(struct archive_entry *a);

const wchar_t *

archive_entry_symlink_w(struct archive_entry *a);

void

archive_entry_set_symlink(struct archive_entry *a, const char *path);

void

archive_entry_copy_symlink(struct archive_entry *a, const char *path);

void

archive_entry_copy_symlink_w(struct archive_entry *a, const wchar_t *path);

int

archive_entry_update_symlink_utf8(struct archive_entry *a, const char *path);

Library

Streaming Archive Library (libarchive, -larchive)

Overview

Path names supported by archive_entry(3):

hardlink

Destination of the hardlink.

link

Update only. For a symlink, update the destination. Otherwise, make the entry a hardlink and alter the destination for that.

pathname

Path in the archive

sourcepath

Path on the disk for use by archive_read_disk(3).

symlink

Destination of the symbolic link.

Path names can be provided in one of three different ways:

char *

Multibyte strings in the current locale.

wchar_t *

Wide character strings in the current locale. The accessor functions are named XXX_w().

UTF-8

Unicode strings encoded as UTF-8. These are convenience functions to update both the multibyte and wide character strings at the same time.

The sourcepath is a pure filesystem concept and never stored in an archive directly.

For that reason, it is only available as multibyte string. The link path is a convenience function for conditionally setting hardlink or symlink destination. It doesn't have a corresponding get accessor function.

archive_entry_set_XXX() is an alias for archive_entry_copy_XXX().

Releases

52 releases since FreeBSD 5.3-RELEASE; the text changed 27 times.

  1. 5.3–5.4
  2. 5.5
  3. 6.0–6.1
  4. 6.2
  5. 6.3
  6. 6.4
  7. 7.0
  8. 7.1
  9. 7.2
  10. 7.3
  11. 7.4
  12. 8.0
  13. 8.1
  14. 8.2
  15. 8.3
  16. 8.4
  17. 9.0
  18. 9.1
  19. 9.2
  20. 9.3
  21. 10.0–10.3
  22. 10.4
  23. 11.0
  24. 11.1–11.3
  25. 11.4
  26. 12.0–12.1
  27. 12.2–14.3
  28. 14.4–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.