Blame libarchive/archive_entry_paths.3

Packit 08bd4c
.\" Copyright (c) 2010 Joerg Sonnenberger
Packit 08bd4c
.\" All rights reserved.
Packit 08bd4c
.\"
Packit 08bd4c
.\" Redistribution and use in source and binary forms, with or without
Packit 08bd4c
.\" modification, are permitted provided that the following conditions
Packit 08bd4c
.\" are met:
Packit 08bd4c
.\" 1. Redistributions of source code must retain the above copyright
Packit 08bd4c
.\"    notice, this list of conditions and the following disclaimer.
Packit 08bd4c
.\" 2. Redistributions in binary form must reproduce the above copyright
Packit 08bd4c
.\"    notice, this list of conditions and the following disclaimer in the
Packit 08bd4c
.\"    documentation and/or other materials provided with the distribution.
Packit 08bd4c
.\"
Packit 08bd4c
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
Packit 08bd4c
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 08bd4c
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit 08bd4c
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
Packit 08bd4c
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 08bd4c
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit 08bd4c
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit 08bd4c
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit 08bd4c
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit 08bd4c
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit 08bd4c
.\" SUCH DAMAGE.
Packit 08bd4c
.\"
Packit 08bd4c
.Dd February 2, 2012
Packit 08bd4c
.Dt ARCHIVE_ENTRY_PATHS 3
Packit 08bd4c
.Os
Packit 08bd4c
.Sh NAME
Packit 08bd4c
.Nm archive_entry_hardlink ,
Packit 08bd4c
.Nm archive_entry_hardlink_w ,
Packit 08bd4c
.Nm archive_entry_set_hardlink ,
Packit 08bd4c
.Nm archive_entry_copy_hardlink ,
Packit 08bd4c
.Nm archive_entry_copy_hardlink_w ,
Packit 08bd4c
.Nm archive_entry_update_hardlink_utf8 ,
Packit 08bd4c
.Nm archive_entry_set_link ,
Packit 08bd4c
.Nm archive_entry_copy_link ,
Packit 08bd4c
.Nm archive_entry_copy_link_w ,
Packit 08bd4c
.Nm archive_entry_update_link_utf8 ,
Packit 08bd4c
.Nm archive_entry_pathname ,
Packit 08bd4c
.Nm archive_entry_pathname_w ,
Packit 08bd4c
.Nm archive_entry_set_pathname ,
Packit 08bd4c
.Nm archive_entry_copy_pathname ,
Packit 08bd4c
.Nm archive_entry_copy_pathname_w ,
Packit 08bd4c
.Nm archive_entry_update_pathname_utf8 ,
Packit 08bd4c
.Nm archive_entry_sourcepath ,
Packit 08bd4c
.Nm archive_entry_copy_sourcepath ,
Packit 08bd4c
.Nm archive_entry_symlink ,
Packit 08bd4c
.Nm archive_entry_symlink_w ,
Packit 08bd4c
.Nm archive_entry_set_symlink ,
Packit 08bd4c
.Nm archive_entry_copy_symlink ,
Packit 08bd4c
.Nm archive_entry_copy_symlink_w ,
Packit 08bd4c
.Nm archive_entry_update_symlink_utf8
Packit 08bd4c
.Nd functions for manipulating path names in archive entry descriptions
Packit 08bd4c
.Sh LIBRARY
Packit 08bd4c
Streaming Archive Library (libarchive, -larchive)
Packit 08bd4c
.Sh SYNOPSIS
Packit 08bd4c
.In archive_entry.h
Packit 08bd4c
.Ft const char *
Packit 08bd4c
.Fn archive_entry_hardlink "struct archive_entry *a"
Packit 08bd4c
.Ft const wchar_t *
Packit 08bd4c
.Fn archive_entry_hardlink_w "struct archive_entry *a"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_set_hardlink "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_copy_hardlink "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_copy_hardlink_w "struct archive_entry *a "const wchar_t *path"
Packit 08bd4c
.Ft int
Packit 08bd4c
.Fn archive_entry_update_hardlink_utf8 "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_set_link "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_copy_link "struct archive_entry *a" " const char *path"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_copy_link_w "struct archive_entry *a" " const wchar_t *path"
Packit 08bd4c
.Ft int
Packit 08bd4c
.Fn archive_entry_update_link_utf8 "struct archive_entry *a" " const char *path"
Packit 08bd4c
.Ft const char *
Packit 08bd4c
.Fn archive_entry_pathname "struct archive_entry *a"
Packit 08bd4c
.Ft const wchar_t *
Packit 08bd4c
.Fn archive_entry_pathname_w "struct archive_entry *a"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_set_pathname "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_copy_pathname "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_copy_pathname_w "struct archive_entry *a" "const wchar_t *path"
Packit 08bd4c
.Ft int
Packit 08bd4c
.Fn archive_entry_update_pathname_utf8 "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft const char *
Packit 08bd4c
.Fn archive_entry_sourcepath "struct archive_entry *a"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_copy_sourcepath "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft const char *
Packit 08bd4c
.Fn archive_entry_symlink "struct archive_entry *a"
Packit 08bd4c
.Ft const wchar_t *
Packit 08bd4c
.Fn archive_entry_symlink_w "struct archive_entry *a"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_set_symlink "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_copy_symlink "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Ft void
Packit 08bd4c
.Fn archive_entry_copy_symlink_w "struct archive_entry *a" "const wchar_t *path"
Packit 08bd4c
.Ft int
Packit 08bd4c
.Fn archive_entry_update_symlink_utf8 "struct archive_entry *a" "const char *path"
Packit 08bd4c
.Sh DESCRIPTION
Packit 08bd4c
Path names supported by
Packit 08bd4c
.Xr archive_entry 3 :
Packit 08bd4c
.Bl -tag -width "sourcepath" -compact
Packit 08bd4c
.It hardlink
Packit 08bd4c
Destination of the hardlink.
Packit 08bd4c
.It link
Packit 08bd4c
Update only.
Packit 08bd4c
For a symlink, update the destination.
Packit 08bd4c
Otherwise, make the entry a hardlink and alter
Packit 08bd4c
the destination for that.
Packit 08bd4c
.It pathname
Packit 08bd4c
Path in the archive
Packit 08bd4c
.It sourcepath
Packit 08bd4c
Path on the disk for use by
Packit 08bd4c
.Xr archive_read_disk 3 .
Packit 08bd4c
.It symlink
Packit 08bd4c
Destination of the symbolic link.
Packit 08bd4c
.El
Packit 08bd4c
.Pp
Packit 08bd4c
Path names can be provided in one of three different ways:
Packit 08bd4c
.Bl -tag -width "wchar_t *"
Packit 08bd4c
.It char *
Packit 08bd4c
Multibyte strings in the current locale.
Packit 08bd4c
.It wchar_t *
Packit 08bd4c
Wide character strings in the current locale.
Packit 08bd4c
The accessor functions are named
Packit 08bd4c
.Fn XXX_w .
Packit 08bd4c
.It UTF-8
Packit 08bd4c
Unicode strings encoded as UTF-8.
Packit 08bd4c
This are convience functions to update both the multibyte and wide
Packit 08bd4c
character strings at the same time.
Packit 08bd4c
.El
Packit 08bd4c
.Pp
Packit 08bd4c
The sourcepath is a pure filesystem concept and never stored in an
Packit 08bd4c
archive directly.
Packit 08bd4c
.Pp
Packit 08bd4c
For that reason, it is only available as multibyte string.
Packit 08bd4c
The link path is a convience function for conditionally setting
Packit 08bd4c
hardlink or symlink destination.
Packit 08bd4c
It doesn't have a corresponding get accessor function.
Packit 08bd4c
.Pp
Packit 08bd4c
.Fn archive_entry_set_XXX
Packit 08bd4c
is an alias for 
Packit 08bd4c
.Fn archive_entry_copy_XXX .
Packit 08bd4c
.Sh SEE ALSO
Packit 08bd4c
.Xr archive_entry 3
Packit 08bd4c
.Xr libarchive 3 ,