---
name: "archive_entry_set_symlink"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/archive_entry_copy_hardlink"
---

# archive\_entry\_set\_symlink(3)

functions for manipulating path names in archive entry descriptions

Part of [archive\_entry\_copy\_hardlink(3)](/archive_entry_copy_hardlink/3.md).

## NAME

**archive\_entry\_hardlink**, **archive\_entry\_hardlink\_w**, **archive\_entry\_set\_hardlink**, **archive\_entry\_copy\_hardlink**, **archive\_entry\_copy\_hardlink\_w**, **archive\_entry\_update\_hardlink\_utf8**, **archive\_entry\_set\_link**, **archive\_entry\_copy\_link**, **archive\_entry\_copy\_link\_w**, **archive\_entry\_update\_link\_utf8**, **archive\_entry\_pathname**, **archive\_entry\_pathname\_w**, **archive\_entry\_set\_pathname**, **archive\_entry\_copy\_pathname**, **archive\_entry\_copy\_pathname\_w**, **archive\_entry\_update\_pathname\_utf8**, **archive\_entry\_sourcepath**, **archive\_entry\_copy\_sourcepath**, **archive\_entry\_symlink**, **archive\_entry\_symlink\_w**, **archive\_entry\_set\_symlink**, **archive\_entry\_copy\_symlink**, **archive\_entry\_copy\_symlink\_w**, **archive\_entry\_update\_symlink\_utf8** – functions for manipulating path names in archive entry descriptions

## LIBRARY

Streaming Archive Library (libarchive, -larchive)

## SYNOPSIS

**#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*);

## DESCRIPTION

Path names supported by [archive\_entry(3)](/archive_entry/3.md):

- 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)](/archive_read_disk/3.md).

- 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**().

## SEE ALSO

[archive\_entry(3)](/archive_entry/3.md), [libarchive(3)](/libarchive/3.md)
