Blame libarchive/archive_entry_paths.3

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