head	1.23;
access;
symbols
	libarchive-3-8-8:1.1.1.24
	pkgsrc-2026Q2:1.22.0.2
	pkgsrc-2026Q2-base:1.22
	libarchive-3-8-7:1.1.1.23
	libarchive-3-8-6:1.1.1.22
	pkgsrc-2026Q1:1.20.0.2
	pkgsrc-2026Q1-base:1.20
	libarchive-3-8-5:1.1.1.21
	libarchive-3-8-4:1.1.1.20
	pkgsrc-2025Q4:1.18.0.2
	pkgsrc-2025Q4-base:1.18
	libarchive-3-8-3:1.1.1.19
	libarchive-3-8-2:1.1.1.18
	pkgsrc-2025Q3:1.16.0.2
	pkgsrc-2025Q3-base:1.16
	libarchive-3-8-1:1.1.1.17
	pkgsrc-2025Q2:1.15.0.2
	pkgsrc-2025Q2-base:1.15
	libarchive-3-8-0:1.1.1.16
	libarchive-3-7-9:1.1.1.15
	pkgsrc-2025Q1:1.13.0.4
	pkgsrc-2025Q1-base:1.13
	pkgsrc-2024Q4:1.13.0.2
	pkgsrc-2024Q4-base:1.13
	libarchive-3-7-7:1.1.1.14
	pkgsrc-2024Q3:1.12.0.2
	pkgsrc-2024Q3-base:1.12
	libarchive-3-7-5:1.1.1.13
	pkgsrc-2024Q2:1.11.0.2
	pkgsrc-2024Q2-base:1.11
	libarchive-3-7-4:1.1.1.12
	libarchive-3-7-3:1.1.1.11
	pkgsrc-2024Q1:1.9.0.2
	pkgsrc-2024Q1-base:1.9
	libarchive-3-7-2:1.1.1.10
	pkgsrc-2023Q4:1.8.0.30
	pkgsrc-2023Q4-base:1.8
	pkgsrc-2023Q3:1.8.0.28
	pkgsrc-2023Q3-base:1.8
	pkgsrc-2023Q2:1.8.0.26
	pkgsrc-2023Q2-base:1.8
	pkgsrc-2023Q1:1.8.0.24
	pkgsrc-2023Q1-base:1.8
	pkgsrc-2022Q4:1.8.0.22
	pkgsrc-2022Q4-base:1.8
	pkgsrc-2022Q3:1.8.0.20
	pkgsrc-2022Q3-base:1.8
	pkgsrc-2022Q2:1.8.0.18
	pkgsrc-2022Q2-base:1.8
	pkgsrc-2022Q1:1.8.0.16
	pkgsrc-2022Q1-base:1.8
	pkgsrc-2021Q4:1.8.0.14
	pkgsrc-2021Q4-base:1.8
	pkgsrc-2021Q3:1.8.0.12
	pkgsrc-2021Q3-base:1.8
	pkgsrc-2021Q2:1.8.0.10
	pkgsrc-2021Q2-base:1.8
	pkgsrc-2021Q1:1.8.0.8
	pkgsrc-2021Q1-base:1.8
	pkgsrc-2020Q4:1.8.0.6
	pkgsrc-2020Q4-base:1.8
	pkgsrc-2020Q3:1.8.0.4
	pkgsrc-2020Q3-base:1.8
	pkgsrc-2020Q2:1.8.0.2
	pkgsrc-2020Q2-base:1.8
	pkgsrc-2020Q1:1.7.0.4
	pkgsrc-2020Q1-base:1.7
	pkgsrc-2019Q4:1.7.0.6
	pkgsrc-2019Q4-base:1.7
	pkgsrc-2019Q3:1.7.0.2
	pkgsrc-2019Q3-base:1.7
	libarchive-3-4-0:1.1.1.9
	libarchive-3-3-3:1.1.1.8
	pkgsrc-2019Q2:1.6.0.2
	pkgsrc-2019Q2-base:1.6
	pkgsrc-2019Q1:1.5.0.16
	pkgsrc-2019Q1-base:1.5
	pkgsrc-2018Q4:1.5.0.14
	pkgsrc-2018Q4-base:1.5
	pkgsrc-2018Q3:1.5.0.12
	pkgsrc-2018Q3-base:1.5
	pkgsrc-2018Q2:1.5.0.10
	pkgsrc-2018Q2-base:1.5
	pkgsrc-2018Q1:1.5.0.8
	pkgsrc-2018Q1-base:1.5
	pkgsrc-2017Q4:1.5.0.6
	pkgsrc-2017Q4-base:1.5
	pkgsrc-2017Q3:1.5.0.4
	pkgsrc-2017Q3-base:1.5
	libarchive-3-3-2:1.1.1.7
	pkgsrc-2017Q2:1.4.0.4
	pkgsrc-2017Q2-base:1.4
	pkgsrc-2017Q1:1.4.0.2
	pkgsrc-2017Q1-base:1.4
	libarchive-3-3-1:1.1.1.6
	pkgsrc-2016Q4:1.3.0.6
	pkgsrc-2016Q4-base:1.3
	pkgsrc-2016Q3:1.3.0.4
	pkgsrc-2016Q3-base:1.3
	pkgsrc-2016Q2:1.3.0.2
	pkgsrc-2016Q2-base:1.3
	libarchive-3-2-1:1.1.1.5
	pkgsrc-2016Q1:1.2.0.10
	pkgsrc-2016Q1-base:1.2
	pkgsrc-2015Q4:1.2.0.8
	pkgsrc-2015Q4-base:1.2
	pkgsrc-2015Q3:1.2.0.6
	pkgsrc-2015Q3-base:1.2
	pkgsrc-2015Q2:1.2.0.4
	pkgsrc-2015Q2-base:1.2
	pkgsrc-2015Q1:1.2.0.2
	pkgsrc-2015Q1-base:1.2
	pkgsrc-2014Q4:1.1.1.4.0.36
	pkgsrc-2014Q4-base:1.1.1.4
	pkgsrc-2014Q3:1.1.1.4.0.34
	pkgsrc-2014Q3-base:1.1.1.4
	pkgsrc-2014Q2:1.1.1.4.0.32
	pkgsrc-2014Q2-base:1.1.1.4
	pkgsrc-2014Q1:1.1.1.4.0.30
	pkgsrc-2014Q1-base:1.1.1.4
	pkgsrc-2013Q4:1.1.1.4.0.28
	pkgsrc-2013Q4-base:1.1.1.4
	pkgsrc-2013Q3:1.1.1.4.0.26
	pkgsrc-2013Q3-base:1.1.1.4
	pkgsrc-2013Q2:1.1.1.4.0.24
	pkgsrc-2013Q2-base:1.1.1.4
	pkgsrc-2013Q1:1.1.1.4.0.22
	pkgsrc-2013Q1-base:1.1.1.4
	pkgsrc-2012Q4:1.1.1.4.0.20
	pkgsrc-2012Q4-base:1.1.1.4
	pkgsrc-2012Q3:1.1.1.4.0.18
	pkgsrc-2012Q3-base:1.1.1.4
	pkgsrc-2012Q2:1.1.1.4.0.16
	pkgsrc-2012Q2-base:1.1.1.4
	pkgsrc-2012Q1:1.1.1.4.0.14
	pkgsrc-2012Q1-base:1.1.1.4
	pkgsrc-2011Q4:1.1.1.4.0.12
	pkgsrc-2011Q4-base:1.1.1.4
	pkgsrc-2011Q3:1.1.1.4.0.10
	pkgsrc-2011Q3-base:1.1.1.4
	pkgsrc-2011Q2:1.1.1.4.0.8
	pkgsrc-2011Q2-base:1.1.1.4
	pkgsrc-2011Q1:1.1.1.4.0.6
	pkgsrc-2011Q1-base:1.1.1.4
	pkgsrc-2010Q4:1.1.1.4.0.4
	pkgsrc-2010Q4-base:1.1.1.4
	pkgsrc-2010Q3:1.1.1.4.0.2
	pkgsrc-2010Q3-base:1.1.1.4
	libarchive-2-8-4:1.1.1.4
	pkgsrc-2010Q2:1.1.1.3.0.4
	pkgsrc-2010Q2-base:1.1.1.3
	pkgsrc-2010Q1:1.1.1.3.0.2
	pkgsrc-2010Q1-base:1.1.1.3
	libarchive-2-8-3:1.1.1.3
	libarchive-2-8-2:1.1.1.2
	libarchive-2-8-0:1.1.1.1
	KIENTZLE:1.1.1;
locks; strict;
comment	@# @;


1.23
date	2026.06.24.06.29.51;	author adam;	state Exp;
branches;
next	1.22;
commitid	keXVOnvWIwV061LG;

1.22
date	2026.04.15.08.46.34;	author adam;	state Exp;
branches;
next	1.21;
commitid	pL26mrnh4kOo62CG;

1.21
date	2026.03.26.11.20.05;	author adam;	state Exp;
branches;
next	1.20;
commitid	8pSUUUHFeJu1BtzG;

1.20
date	2026.01.06.11.55.22;	author adam;	state Exp;
branches;
next	1.19;
commitid	lOosf75XWhczkkpG;

1.19
date	2025.12.23.14.01.22;	author adam;	state Exp;
branches;
next	1.18;
commitid	3zKcl3VhUVXFtxnG;

1.18
date	2025.11.20.06.08.25;	author adam;	state Exp;
branches;
next	1.17;
commitid	kB7NF5kSlmUaVfjG;

1.17
date	2025.11.02.08.52.12;	author adam;	state Exp;
branches;
next	1.16;
commitid	hdaVwMAEUWR8pXgG;

1.16
date	2025.07.01.15.14.43;	author adam;	state Exp;
branches;
next	1.15;
commitid	sA2cBFYBXpUBv31G;

1.15
date	2025.05.21.15.25.49;	author adam;	state Exp;
branches;
next	1.14;
commitid	6aTN21WjRYk8TMVF;

1.14
date	2025.04.28.10.31.33;	author adam;	state Exp;
branches;
next	1.13;
commitid	Tocq615J6mYPZNSF;

1.13
date	2024.10.19.05.39.56;	author adam;	state Exp;
branches;
next	1.12;
commitid	fYRSlpIWMYluweuF;

1.12
date	2024.09.15.07.02.18;	author adam;	state Exp;
branches;
next	1.11;
commitid	x365AQIKhret4SpF;

1.11
date	2024.04.30.06.05.17;	author adam;	state Exp;
branches;
next	1.10;
commitid	id0E8i4RwCC4c88F;

1.10
date	2024.04.12.15.39.48;	author adam;	state Exp;
branches;
next	1.9;
commitid	52ilmjFHKDf0XR5F;

1.9
date	2024.01.18.18.00.13;	author adam;	state Exp;
branches;
next	1.8;
commitid	hNXpsHx3SuHqsXUE;

1.8
date	2020.05.26.09.16.40;	author nia;	state Exp;
branches;
next	1.7;
commitid	nNhsdZACz3PjmJ9C;

1.7
date	2019.09.22.09.55.07;	author joerg;	state Exp;
branches;
next	1.6;
commitid	FdPvRjF4OzwBwZDB;

1.6
date	2019.04.10.08.24.05;	author adam;	state Exp;
branches;
next	1.5;
commitid	LnliQ9ieqYkikMiB;

1.5
date	2017.08.01.22.26.22;	author joerg;	state Exp;
branches;
next	1.4;
commitid	32clTfkmVE8bPy1A;

1.4
date	2017.02.25.21.11.19;	author joerg;	state Exp;
branches;
next	1.3;
commitid	rW8QfCWrsCO1snHz;

1.3
date	2016.06.20.17.24.56;	author joerg;	state Exp;
branches;
next	1.2;
commitid	ArUvympBjfBseebz;

1.2
date	2015.01.17.12.44.49;	author adam;	state Exp;
branches;
next	1.1;
commitid	yy7e1hLrfmA2pn6y;

1.1
date	2010.02.20.03.49.43;	author joerg;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2010.02.20.03.49.43;	author joerg;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2010.03.14.17.57.24;	author joerg;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2010.03.16.17.07.03;	author joerg;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2010.07.09.11.53.33;	author joerg;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2016.06.20.17.11.50;	author joerg;	state Exp;
branches;
next	1.1.1.6;
commitid	rRgm3BqbmbI8aebz;

1.1.1.6
date	2017.02.25.20.54.23;	author joerg;	state Exp;
branches;
next	1.1.1.7;
commitid	ReqPI0ibLYjdmnHz;

1.1.1.7
date	2017.08.01.22.21.12;	author joerg;	state Exp;
branches;
next	1.1.1.8;
commitid	XQwPAFJku336Ny1A;

1.1.1.8
date	2019.09.22.09.47.03;	author joerg;	state Exp;
branches;
next	1.1.1.9;
commitid	N0KxAXOYyULduZDB;

1.1.1.9
date	2019.09.22.09.51.33;	author joerg;	state Exp;
branches;
next	1.1.1.10;
commitid	5kDbfPbiV3INvZDB;

1.1.1.10
date	2024.01.18.17.37.45;	author adam;	state Exp;
branches;
next	1.1.1.11;
commitid	zDULEPUODGjTkXUE;

1.1.1.11
date	2024.04.12.15.27.44;	author adam;	state Exp;
branches;
next	1.1.1.12;
commitid	tQWTddCoxBumSR5F;

1.1.1.12
date	2024.04.30.05.50.49;	author adam;	state Exp;
branches;
next	1.1.1.13;
commitid	e4DnFoZdQV9Z688F;

1.1.1.13
date	2024.09.15.06.45.25;	author adam;	state Exp;
branches;
next	1.1.1.14;
commitid	pOuXKsbh8iPCYRpF;

1.1.1.14
date	2024.10.19.05.27.34;	author adam;	state Exp;
branches;
next	1.1.1.15;
commitid	v1iXM4j1Na52seuF;

1.1.1.15
date	2025.04.28.09.44.10;	author adam;	state Exp;
branches;
next	1.1.1.16;
commitid	1zB7ffc4d2qCJNSF;

1.1.1.16
date	2025.05.21.15.11.28;	author adam;	state Exp;
branches;
next	1.1.1.17;
commitid	Nzqt2UgtvkVXNMVF;

1.1.1.17
date	2025.07.01.14.58.53;	author adam;	state Exp;
branches;
next	1.1.1.18;
commitid	wKXYoBc9F9j8q31G;

1.1.1.18
date	2025.11.02.08.32.34;	author adam;	state Exp;
branches;
next	1.1.1.19;
commitid	8C56Xg3dc0HriXgG;

1.1.1.19
date	2025.11.20.05.51.45;	author adam;	state Exp;
branches;
next	1.1.1.20;
commitid	LC6NMc2P0QpnPfjG;

1.1.1.20
date	2025.12.23.13.41.06;	author adam;	state Exp;
branches;
next	1.1.1.21;
commitid	hhQbXTytJ7PFmxnG;

1.1.1.21
date	2026.01.06.11.43.29;	author adam;	state Exp;
branches;
next	1.1.1.22;
commitid	Q4rjOheYoLWofkpG;

1.1.1.22
date	2026.03.26.11.11.16;	author adam;	state Exp;
branches;
next	1.1.1.23;
commitid	P6u0vpfNBymXxtzG;

1.1.1.23
date	2026.04.15.08.40.11;	author adam;	state Exp;
branches;
next	1.1.1.24;
commitid	enlkxxj5Vxhi42CG;

1.1.1.24
date	2026.06.24.05.39.01;	author adam;	state Exp;
branches;
next	;
commitid	zmhI9f4umm2AO0LG;


desc
@@


1.23
log
@libarchive: updated to 3.8.8

Libarchive 3.8.8 is a security, bugfix and minor feature release.

New features:

add support for reading encrypted zipx formats (bzip2, lzma, ppmd, xz, zstd)

Fix overview:
https://github.com/libarchive/libarchive/releases/tag/v3.8.8
@
text
@<!-- Creator     : groff version 1.23.0 -->
<!-- CreationDate: Tue Jun 23 09:58:12 2026 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p><i>ARCHIVE_READ_DISK</i>(3) Library Functions Manual
<i>ARCHIVE_READ_DISK</i>(3)</p>

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:9%;">archive_read_disk_new,
archive_read_disk_open, archive_read_disk_open_w,
archive_read_disk_set_behavior,
archive_read_disk_set_symlink_logical,
archive_read_disk_set_symlink_physical,
archive_read_disk_set_symlink_hybrid,
archive_read_disk_entry_from_file, archive_read_disk_gname,
archive_read_disk_uname, archive_read_disk_set_uname_lookup,
archive_read_disk_set_gname_lookup,
archive_read_disk_set_standard_lookup,
archive_read_disk_descend, archive_read_disk_can_descend,
archive_read_disk_current_filesystem,
archive_read_disk_current_filesystem_is_synthetic,
archive_read_disk_current_filesystem_is_remote,
archive_read_disk_set_matching,
archive_read_disk_set_metadata_filter_callback, &mdash;
functions for reading objects from disk</p>

<p style="margin-top: 1em"><b>LIBRARY</b></p>

<p style="margin-left:9%;">Streaming Archive Library
(libarchive, -larchive)</p>

<p style="margin-top: 1em"><b>SYNOPSIS</b></p>

<p style="margin-left:9%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:9%; margin-top: 1em"><i>struct
archive *</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_new</b>(<i>void</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_open</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_open_w</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;wchar_t&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_behavior</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_logical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_physical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_gname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>gid_t</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>const char
*</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_uname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>uid_t</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_set_gname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*(*lookup)(void&nbsp;*,&nbsp;gid_t)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_set_uname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*(*lookup)(void&nbsp;*,&nbsp;uid_t)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_standard_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_entry_from_file</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>, <i>int&nbsp;fd</i>,
<i>const&nbsp;struct&nbsp;stat&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_descend</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_can_descend</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_current_filesystem</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_current_filesystem_is_synthetic</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_current_filesystem_is_remote</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_set_matching</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;(*excluded_func)(struct&nbsp;archive&nbsp;*,&nbsp;void&nbsp;*,&nbsp;struct&nbsp;archive&nbsp;entry&nbsp;*)</i>,
<i>void&nbsp;*</i>);</p>

<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_set_metadata_filter_callback</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int&nbsp;(*metadata_filter_func)(struct&nbsp;archive&nbsp;*,&nbsp;void*,&nbsp;struct&nbsp;archive_entry&nbsp;*)</i>,
<i>void&nbsp;*</i>);</p>

<p style="margin-top: 1em"><b>DESCRIPTION</b></p>

<p style="margin-left:9%;">These functions provide an API
for reading information about objects on disk. In
particular, they provide an interface for populating struct
archive_entry objects.</p>


<p style="margin-top: 1em"><b>archive_read_disk_new</b>()</p>

<p style="margin-left:19%;">Allocates and initializes a
struct archive object suitable for reading object
information from disk.</p>


<p style="margin-top: 1em"><b>archive_read_disk_open</b>()</p>

<p style="margin-left:19%;">Opens the file or directory
from the given path and prepares the struct archive to read
it from disk.</p>


<p style="margin-top: 1em"><b>archive_read_disk_open_w</b>()</p>

<p style="margin-left:19%;">Opens the file or directory
from the given path as a wide character string and prepares
the struct archive to read it from disk.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_behavior</b>()</p>

<p style="margin-left:19%;">Configures various behavior
options when reading entries from disk. The flags field
consists of a bitwise OR of one or more of the following
values:</p>

<p><b>ARCHIVE_READDISK_HONOR_NODUMP</b></p>

<p style="margin-left:29%;">Skip files and directories with
the nodump file attribute (file flag) set. By default, the
nodump file attribute is ignored.</p>

<p><b>ARCHIVE_READDISK_MAC_COPYFILE</b></p>

<p style="margin-left:29%;">Mac OS X specific. Read
metadata (ACLs and extended attributes) with
<i>copyfile</i>(3). By default, metadata is read using
<i>copyfile</i>(3).</p>

<p><b>ARCHIVE_READDISK_NO_ACL</b></p>

<p style="margin-left:29%;">Do not read Access Control
Lists. By default, ACLs are read from disk.</p>

<p><b>ARCHIVE_READDISK_NO_FFLAGS</b></p>

<p style="margin-left:29%;">Do not read file attributes
(file flags). By default, file attributes are read from
disk. See <i>chattr</i>(1) (Linux) or <i>chflags</i>(1)
(FreeBSD, Mac OS X) for more information on file
attributes.</p>

<p><b>ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS</b></p>

<p style="margin-left:29%;">Do not traverse mount points.
By default, mount points are traversed.</p>

<p><b>ARCHIVE_READDISK_NO_XATTR</b></p>

<p style="margin-left:29%;">Do not read extended file
attributes (xattrs). By default, extended file attributes
are read from disk. See <i>xattr</i>(7) (Linux),
<i>xattr</i>(2) (Mac OS X), or <i>getextattr</i>(8)
(FreeBSD) for more information on extended file
attributes.</p>

<p><b>ARCHIVE_READDISK_RESTORE_ATIME</b></p>

<p style="margin-left:29%;">Restore access time of
traversed files. By default, access time of traversed files
is not restored.</p>

<p><b>ARCHIVE_READDISK_NO_SPARSE</b></p>

<p style="margin-left:29%;">Do not read sparse file
information. By default, sparse file information is read
from disk.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_symlink_logical</b>(),
<b>archive_read_disk_set_symlink_physical</b>(),
<b>archive_read_disk_set_symlink_hybrid</b>()</p>

<p style="margin-left:19%;">This sets the mode used for
handling symbolic links. The &ldquo;logical&rdquo; mode
follows all symbolic links. The &ldquo;physical&rdquo; mode
does not follow any symbolic links. The &ldquo;hybrid&rdquo;
mode currently behaves identically to the
&ldquo;logical&rdquo; mode.</p>


<p style="margin-top: 1em"><b>archive_read_disk_gname</b>(),
<b>archive_read_disk_uname</b>()</p>

<p style="margin-left:19%;">Returns a user or group name
given a gid or uid value. By default, these always return a
NULL string.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_gname_lookup</b>(),
<b>archive_read_disk_set_uname_lookup</b>()</p>

<p style="margin-left:19%;">These allow you to override the
functions used for user and group name lookups. You may also
provide a void * pointer to a private data structure and a
cleanup function for that data. The cleanup function will be
invoked when the struct archive object is destroyed or when
new lookup functions are registered.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_standard_lookup</b>()</p>

<p style="margin-left:19%;">This convenience function
installs a standard set of user and group name lookup
functions. These functions use <i>getpwuid</i>(3) and
<i>getgrgid</i>(3) to convert ids to names, defaulting to
NULL if the names cannot be looked up. These functions also
implement a simple memory cache to reduce the number of
calls to <i>getpwuid</i>(3) and <i>getgrgid</i>(3).</p>


<p style="margin-top: 1em"><b>archive_read_disk_entry_from_file</b>()</p>

<p style="margin-left:19%;">Populates a struct
archive_entry object with information about a particular
file. The archive_entry object must have already been
created with <i>archive_entry_new</i>(3) and at least one of
the source path or path fields must already be set. (If both
are set, the source path will be used.)</p>

<p style="margin-left:19%; margin-top: 1em">Information is
read from disk using the path name from the struct
archive_entry object. If a file descriptor is provided, some
information will be obtained using that file descriptor, on
platforms that support the appropriate system calls.</p>

<p style="margin-left:19%; margin-top: 1em">If a pointer to
a struct stat is provided, information from that structure
will be used instead of reading from the disk where
appropriate. This can provide performance benefits in
scenarios where struct stat information has already been
read from the disk as a side effect of some other operation.
(For example, directory traversal libraries often provide
this information.)</p>

<p style="margin-left:19%; margin-top: 1em">Where
necessary, user and group ids are converted to user and
group names using the currently-registered lookup functions
above. This affects the file ownership fields and ACL values
in the struct archive_entry object.</p>


<p style="margin-top: 1em"><b>archive_read_disk_descend</b>()</p>

<p style="margin-left:19%;">If the current entry can be
descended, this function will mark the directory as the next
entry for <i>archive_read_header</i>(3) to visit.</p>


<p style="margin-top: 1em"><b>archive_read_disk_can_descend</b>()</p>

<p style="margin-left:19%;">Returns 1 if the current entry
is an unvisited directory and 0 otherwise.</p>


<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem</b>()</p>

<p style="margin-left:19%;">Returns the index of the most
recent filesystem entry that has been visited through
archive_read_disk</p>


<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem_is_synthetic</b>()</p>

<p style="margin-left:19%;">Returns 1 if the current
filesystem is a virtual filesystem. Returns 0 if the current
filesystem is not a virtual filesystem. Returns -1 if it is
unknown.</p>


<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem_is_remote</b>()</p>

<p style="margin-left:19%;">Returns 1 if the current
filesystem is a remote filesystem. Returns 0 if the current
filesystem is not a remote filesystem. Returns -1 if it is
unknown.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_matching</b>()</p>

<p style="margin-left:19%;">Allows the caller to set struct
archive *_ma to compare each entry during
<i>archive_read_header</i>(3) calls. If matched based on
calls to archive_match_path_excluded,
archive_match_time_excluded, or
archive_match_owner_excluded, then the callback function
specified by the _excluded_func parameter will execute. This
function will receive data provided to the fourth parameter,
void *_client_data.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_metadata_filter_callback</b>()</p>

<p style="margin-left:19%;">Allows the caller to set a
callback function during calls to
<i>archive_read_header</i>(3) to filter out metadata for
each entry. The callback function receives the struct
archive object, void* custom filter data, and the struct
archive_entry. If the callback function returns an error,
ARCHIVE_RETRY will be returned and the entry will not be
further processed.</p>

<p style="margin-left:9%;">More information about the
<i>struct archive</i> object and the overall design of the
library can be found in the <i>libarchive</i>(3)
overview.</p>

<p style="margin-top: 1em"><b>EXAMPLES</b></p>

<p style="margin-left:9%;">The following illustrates basic
usage of the library by showing how to use it to copy an
item on disk into an archive.</p>

<p style="margin-left:17%; margin-top: 1em">void <br>
file_to_archive(struct archive *a, const char *name) <br>
{ <br>
char buff[8192]; <br>
size_t bytes_read; <br>
struct archive *ard; <br>
struct archive_entry *entry; <br>
int fd;</p>

<p style="margin-left:17%; margin-top: 1em">ard =
archive_read_disk_new(); <br>
archive_read_disk_set_standard_lookup(ard); <br>
entry = archive_entry_new(); <br>
fd = open(name, O_RDONLY); <br>
if (fd &lt; 0) <br>
return; <br>
archive_entry_copy_pathname(entry, name); <br>
archive_read_disk_entry_from_file(ard, entry, fd, NULL);
<br>
archive_write_header(a, entry); <br>
while ((bytes_read = read(fd, buff, sizeof(buff))) &gt; 0)
<br>
archive_write_data(a, buff, bytes_read); <br>
archive_write_finish_entry(a); <br>
archive_read_free(ard); <br>
archive_entry_free(entry); <br>
}</p>

<p style="margin-top: 1em"><b>RETURN VALUES</b></p>

<p style="margin-left:9%;">Most functions return
<b>ARCHIVE_OK</b> (zero) on success, or one of several
negative error codes for errors. Specific error codes
include: <b>ARCHIVE_RETRY</b> for operations that might
succeed if retried, <b>ARCHIVE_WARN</b> for unusual
conditions that do not prevent further operations, and
<b>ARCHIVE_FATAL</b> for serious errors that make remaining
operations impossible.</p>


<p style="margin-left:9%; margin-top: 1em"><b>archive_read_disk_new</b>()
returns a pointer to a newly-allocated struct archive object
or NULL if the allocation failed for any reason.</p>


<p style="margin-left:9%; margin-top: 1em"><b>archive_read_disk_gname</b>()
and <b>archive_read_disk_uname</b>() return const char *
pointers to the textual name or NULL if the lookup failed
for any reason. The returned pointer points to internal
storage that may be reused on the next call to either of
these functions; callers should copy the string if they need
to continue accessing it.</p>

<p style="margin-top: 1em"><b>ERRORS</b></p>

<p style="margin-left:9%;">Detailed error codes and textual
descriptions are available from the <b>archive_errno</b>()
and <b>archive_error_string</b>() functions.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:9%;"><i>tar</i>(1),
<i>archive_read</i>(3), <i>archive_util</i>(3),
<i>archive_write</i>(3), <i>archive_write_disk</i>(3),
<i>libarchive</i>(3)</p>

<p style="margin-top: 1em"><b>HISTORY</b></p>

<p style="margin-left:9%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3. The
<b>archive_read_disk</b> interface was added to
<b>libarchive 2.6</b> and first appeared in
FreeBSD&nbsp;8.0.</p>

<p style="margin-top: 1em"><b>AUTHORS</b></p>

<p style="margin-left:9%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lt;kientzle@@FreeBSD.org&gt;.</p>

<p style="margin-top: 1em"><b>BUGS</b></p>

<p style="margin-left:9%;">The &ldquo;standard&rdquo; user
name and group name lookup functions are not the defaults
because <i>getgrgid</i>(3) and <i>getpwuid</i>(3) are
sometimes too large for particular applications. The current
design allows the application author to use a more compact
implementation when appropriate.</p>

<p style="margin-left:9%; margin-top: 1em">The full list of
metadata read from disk by
<b>archive_read_disk_entry_from_file</b>() is necessarily
system-dependent.</p>

<p style="margin-left:9%; margin-top: 1em">The
<b>archive_read_disk_entry_from_file</b>() function reads as
much information as it can from disk. Some method should be
provided to limit this so that clients who do not need ACLs,
for instance, can avoid the extra work needed to look up
such information.</p>

<p style="margin-left:9%; margin-top: 1em">This API should
provide a set of methods for walking a directory tree. That
would make it a direct parallel of the
<i>archive_read</i>(3) API. When such methods are
implemented, the &ldquo;hybrid&rdquo; symbolic link mode
will make sense. Debian April 3, 2017
<i>ARCHIVE_READ_DISK</i>(3)</p>
<hr>
</body>
</html>
@


1.22
log
@libarchive: updated to 3.8.7

Libarchive 3.8.7 is a security and bugfix release.

Notable fixes:

CAB: fix NULL pointer dereference during skip
CAB: Fix Heap OOB Write in CAB LZX decoder
cpio: various fixes and improvements
contrib/untar: fix out-of-bounds read
iso9660: fix undefined behavior
iso9660: fix posibble heap buffer overflow on 32-bit systems
libarchive: fix handling of option failures
libarchive: do not continue with truncated numbers
libarchive: lzop and grzip filter support
RAR: fix LZSS window size mismatch after PPMd block
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Apr 13 12:57:33 2026 -->
@


1.21
log
@libarchive: updated to 3.8.6

Libarchive 3.8.6 is a security and bugfix release.

Notable fixes:

libarchive: fix incompatibility with Nettle 4.x
libarchive: fix NULL pointer dereference in archive_acl_from_text_w()
bsdunzip: fix ISO week year and Gregorian year confusion
7zip: ix SEGV in check_7zip_header_in_sfx via ELF offset validation
7zip: fix out-of-bounds access on ELF 64-bit header
RAR5 reader: fix infinite loop in rar5 decompression
RAR5 reader: fix potential memory leak
RAR5: fix SIGSEGV when archive_read_support_format_rar5 is called twice
CAB reader: fix memory leak on repeated calls to archive_read_support_format_cab
mtree reader: Fix file descriptor leak in mtree parser cleanup
various small bugfixes in code and documentation
@
text
@d2 1
a2 1
<!-- CreationDate: Tue Mar 10 09:57:28 2026 -->
@


1.20
log
@libarchive: updated to 3.8.5

3.8.5

Notable bugxies:

bsdtar: fix regression from 3.8.4 zero-length pattern issue bugfix
various small bugfixes in code and documentation
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jan  5 10:42:43 2026 -->
@


1.19
log
@libarchive: updated to 3.8.4

3.8.4

Notable bugxies:

bsdtar: Fix zero-length pattern issue
lib: Fix regression introduced in libarchive 3.8.2 when walking enterable but unreadable directories
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Dec  1 12:42:37 2025 -->
@


1.18
log
@libarchive: updated to 3.8.3

Libarchive 3.8.3 is a bugfix and security release.

Security fixes:

lib: Create temporary files in the target directory
lha: Fix for an out-of-bounds buffer overrun when using p[H_LEVEL_OFFSET]
7-zip: Fix a buffer overrun when reading truncated 7zip headers

Notable bugxies:

lz4 and zstd: Support both lz4 and zstd data with leading skippable frames
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Nov 17 22:19:02 2025 -->
@


1.17
log
@libarchive: updated to 3.8.2

Libarchive 3.8.2 is a bugfix and security release.

Security fixes:

7zip: Fix out of boundary access
tar reader: fix checking the result of the strftime

Notable bugfixes:

bsdtar: Allow filename to have CRLF endings
lib: archive_read_data: handle sparse holes at end of file correctly
lib: improve filter process handling
lib: fix error checking in writing files
lib: handle possible errors from system calls
lib: avoid leaking file descriptors into subprocesses
lib: parse_date: handle dates in 2038 and beyond if time_t is big enough
RAR5 reader: fix multiple issues in extra field parsing function
RAR5 reader: early fail when file declares data for a dir entry
tar writer: fix replacing a regular file with a dir for ARCHIVE_EXTRACT_SAFE_WRITES
tar reader (Windows): check WCS pathname in header_gnutar before overwriting
tar reader: fix an infinite loop when parsing V headers
zip writer: fix a memory leak if write callback error early
zip writer: fix writing with ZSTD compression
zstd write filter: enable Zstandard's checksum feature
@
text
@d2 1
a2 1
<!-- CreationDate: Wed Oct 15 21:49:45 2025 -->
@


1.16
log
@libarchive: updated to 3.8.1

3.8.1

Important bugfixes

various compilation fixes
fixed undefined behavior in a function in warc reader
Windows binary uses xz 5.2.5
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Jun  1 19:29:39 2025 -->
@


1.15
log
@libarchive bsdtar: updated to 3.8.0

Libarchive 3.8.0 is a feature and bugfix release.

New features:
bsdtar: support --mtime and --clamp-mtime
lib: mbedtls 3.x compatibility
7-zip reader: improve self-extracting archive detection
xar: xmllite support for the XAR reader and writer
zip writer: added XZ, LZMA, ZSTD and BZIP2 support
zip writer: added LZMA + RISCV BCJ filter

Notable security fixes:
rar: do not skip past EOF while reading
rar: fix double free with over 4 billion nodes
rar: fix heap-buffer-overflow
warc: prevent signed integer overflow
tar: fix overflow in build_ustar_entry

Notable bugfixes:
bsdtar: don't hardlink negative inode files together
gz: allow setting the original filename for gzip compressed files
lib: improve lseek handling
lib: support @@-prefixed Unix epoch timestamps as date strings
rar: support large headers on 32 bit systems
tar reader: Improve LFS support on 32 bit systems
@
text
@d2 1
a2 1
<!-- CreationDate: Tue May 20 09:02:18 2025 -->
@


1.14
log
@bsdtar libarchive: updated to 3.7.9

3.7.9

Important bugfixes:

a regression in libarchive 3.7.8 regarding GNU sparse entries was fixed


3.7.8

Security fixes:

tar reader: Handle truncation in the middle of a GNU long linkname
unzip: fix null pointer dereference
tar reader: fix unchecked return value in list_item_verbose()

Important bugfixes:

7zip reader: add SPARC
tar reader: Ignore ustar size when pax size is present
tar writer: Fix bug when -s/a/b/ used more than once with b flag
cpio: Fix a Y2038 bug on Windows
libarchive: Handle ARCHIVE_FILTER_LZOP in archive_read_append_filter
libarchive: Adding missing seeker function to archive_read_open_FILE()
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
@


1.13
log
@libarchive: updated to 3.7.7

Libarchive 3.7.7 is a bugfix and security release

Security fixes:

gzip: prevent a hang when processing a malformed gzip inside a gzip
tar: don't crash on truncated tar archives
tar: fix two leaks in tar header parsing

Important bugfixes:

7-zip: read/write symlink paths as UTF-8
cpio: exit with an error code if an entry could not be extracted
rar5: report encrypted entries
tar: fix truncation of entry pathnames in specific archives
windows: fix ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS


Libarchive 3.7.6 is a bugfix and security release.
This release fixes a tar regression introduced in libarchive 3.7.5

Important bugfixes.

tar: clean up linkpath between entries
tar: fix memory leaks when processing symlinks or parsing pax headers
iso: be more cautious about parsing ISO-9660 timestamps
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Oct 13 08:12:09 2024 -->
@


1.12
log
@libarchive: updated to 3.7.5

Libarchive 3.7.5

Security fixes:

fix multiple vulnerabilities identified by SAST
cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing
lzop: prevent integer overflow
rar4: protect copy_from_lzss_window_to_unp()
rar4: fix CVE-2024-26256
rar4: fix OOB in delta and audio filter
rar4: fix out of boundary access with large files
rar4: add boundary checks to rgb filter
rar4: fix OOB access with unicode filenames
rar5: clear 'data ready' cache on window buffer reallocs
rpm: calculate huge header sizes correctly
unzip: unify EOF handling
util: fix out of boundary access in mktemp functions
uu: stop processing if lines are too long

Important bugfixes:

7zip: fix issue when skipping first file in 7zip archive that is a multiple of 65536 bytes
ar: fix archive entries having no type
lha: do not allow negative file sizes
lha: fix integer truncation on 32-bit systems
shar: check strdup return value
rar5: don't try to read rediculously long names
xar: fix another infinite loop and expat error handling
many Windows fixes, cleanups and improvements
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Fri Sep 13 20:31:05 2024 -->
d23 2
a24 2
<p>ARCHIVE_READ_DISK(3) BSD Library Functions Manual
ARCHIVE_READ_DISK(3)</p>
d28 17
a44 21
<p style="margin-left:6%;"><b>archive_read_disk_new</b>,
<b>archive_read_disk_open</b>,
<b>archive_read_disk_open_w</b>,
<b>archive_read_disk_set_behavior</b>,
<b>archive_read_disk_set_symlink_logical</b>,
<b>archive_read_disk_set_symlink_physical</b>,
<b>archive_read_disk_set_symlink_hybrid</b>,
<b>archive_read_disk_entry_from_file</b>,
<b>archive_read_disk_gname</b>,
<b>archive_read_disk_uname</b>,
<b>archive_read_disk_set_uname_lookup</b>,
<b>archive_read_disk_set_gname_lookup</b>,
<b>archive_read_disk_set_standard_lookup</b>,
<b>archive_read_disk_descend</b>,
<b>archive_read_disk_can_descend</b>,
<b>archive_read_disk_current_filesystem</b>,
<b>archive_read_disk_current_filesystem_is_synthetic</b>,
<b>archive_read_disk_current_filesystem_is_remote</b>,
<b>archive_read_disk_set_matching</b>,
<b>archive_read_disk_set_metadata_filter_callback</b>,
&mdash; functions for reading objects from disk</p>
d48 1
a48 1
<p style="margin-left:6%;">Streaming Archive Library
d53 1
a53 1
<p style="margin-left:6%;"><b>#include
d56 1
a56 1
<p style="margin-left:6%; margin-top: 1em"><i>struct
d60 1
a60 1
<p style="margin-left:12%;"><b>archive_read_disk_new</b>(<i>void</i>);</p>
d62 1
a62 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d65 1
a65 1
<p style="margin-left:12%;"><b>archive_read_disk_open</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d68 1
a68 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d71 1
a71 1
<p style="margin-left:12%;"><b>archive_read_disk_open_w</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d74 1
a74 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d77 1
a77 1
<p style="margin-left:12%;"><b>archive_read_disk_set_behavior</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d80 1
a80 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d83 1
a83 1
<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_logical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d85 1
a85 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d88 1
a88 1
<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_physical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d90 1
a90 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d93 1
a93 1
<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d95 1
a95 1
<p style="margin-left:6%; margin-top: 1em"><i>const char
d99 1
a99 1
<p style="margin-left:12%;"><b>archive_read_disk_gname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d102 1
a102 1
<p style="margin-left:6%; margin-top: 1em"><i>const char
d106 1
a106 1
<p style="margin-left:12%;"><b>archive_read_disk_uname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d109 1
a109 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d117 1
a117 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d125 1
a125 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d128 1
a128 1
<p style="margin-left:12%;"><b>archive_read_disk_set_standard_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d130 1
a130 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d137 1
a137 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d140 1
a140 1
<p style="margin-left:12%;"><b>archive_read_disk_descend</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d142 1
a142 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d145 1
a145 1
<p style="margin-left:12%;"><b>archive_read_disk_can_descend</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d147 1
a147 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d150 1
a150 1
<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d152 1
a152 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d155 1
a155 1
<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem_is_synthetic</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d157 1
a157 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d160 1
a160 1
<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem_is_remote</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d162 1
a162 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d170 1
a170 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d179 1
a179 1
<p style="margin-left:6%;">These functions provide an API
d187 1
a187 1
<p style="margin-left:17%;">Allocates and initializes a
d194 1
a194 1
<p style="margin-left:17%;">Opens the file or directory
d201 1
a201 1
<p style="margin-left:17%;">Opens the file or directory
d208 1
a208 1
<p style="margin-left:17%;">Configures various behavior
d215 1
a215 1
<p style="margin-left:27%;">Skip files and directories with
d221 4
a224 3
<p style="margin-left:27%;">Mac OS X specific. Read
metadata (ACLs and extended attributes) with copyfile(3). By
default, metadata is read using copyfile(3).</p>
d228 1
a228 1
<p style="margin-left:27%;">Do not read Access Control
d233 1
a233 1
<p style="margin-left:27%;">Do not read file attributes
d235 3
a237 2
disk. See chattr(1) (Linux) or chflags(1) (FreeBSD, Mac OS
X) for more information on file attributes.</p>
d241 1
a241 1
<p style="margin-left:27%;">Do not traverse mount points.
d246 1
a246 1
<p style="margin-left:27%;">Do not read extended file
d248 4
a251 3
are read from disk. See xattr(7) (Linux), xattr(2) (Mac OS
X), or getextattr(8) (FreeBSD) for more information on
extended file attributes.</p>
d255 1
a255 1
<p style="margin-left:27%;">Restore access time of
d261 1
a261 1
<p style="margin-left:27%;">Do not read sparse file
d270 1
a270 1
<p style="margin-left:17%;">This sets the mode used for
d281 1
a281 1
<p style="margin-left:17%;">Returns a user or group name
d289 1
a289 1
<p style="margin-left:17%;">These allow you to override the
d299 1
a299 1
<p style="margin-left:17%;">This convenience function
d301 5
a305 5
functions. These functions use getpwuid(3) and getgrgid(3)
to convert ids to names, defaulting to NULL if the names
cannot be looked up. These functions also implement a simple
memory cache to reduce the number of calls to getpwuid(3)
and getgrgid(3).</p>
d310 1
a310 1
<p style="margin-left:17%;">Populates a struct
d313 3
a315 3
created with archive_entry_new(3) and at least one of the
source path or path fields must already be set. (If both are
set, the source path will be used.)</p>
d317 1
a317 1
<p style="margin-left:17%; margin-top: 1em">Information is
d323 1
a323 1
<p style="margin-left:17%; margin-top: 1em">If a pointer to
d332 1
a332 1
<p style="margin-left:17%; margin-top: 1em">Where
d341 1
a341 1
<p style="margin-left:17%;">If the current entry can be
d343 1
a343 1
entry for archive_read_header(3) to visit.</p>
d348 1
a348 1
<p style="margin-left:17%;">Returns 1 if the current entry
d354 1
a354 1
<p style="margin-left:17%;">Returns the index of the most
d361 1
a361 1
<p style="margin-left:17%;">Returns 1 if the current
d369 1
a369 1
<p style="margin-left:17%;">Returns 1 if the current
d377 1
a377 1
<p style="margin-left:17%;">Allows the caller to set struct
d379 3
a381 2
archive_read_header(3) calls. If matched based on calls to
archive_match_path_excluded, archive_match_time_excluded, or
d390 8
a397 7
<p style="margin-left:17%;">Allows the caller to set a
callback function during calls to archive_read_header(3) to
filter out metadata for each entry. The callback function
receives the struct archive object, void* custom filter
data, and the struct archive_entry. If the callback function
returns an error, ARCHIVE_RETRY will be returned and the
entry will not be further processed.</p>
d399 1
a399 1
<p style="margin-left:6%;">More information about the
d401 2
a402 1
library can be found in the libarchive(3) overview.</p>
d406 1
a406 1
<p style="margin-left:6%;">The following illustrates basic
d410 1
a410 1
<p style="margin-left:14%; margin-top: 1em">void <br>
d419 1
a419 1
<p style="margin-left:14%; margin-top: 1em">ard =
d440 1
a440 1
<p style="margin-left:6%;">Most functions return
d450 1
a450 1
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_disk_new</b>()
d455 1
a455 1
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_disk_gname</b>()
d465 1
a465 1
<p style="margin-left:6%;">Detailed error codes and textual
d471 4
a474 3
<p style="margin-left:6%;">tar(1), archive_read(3),
archive_util(3), archive_write(3), archive_write_disk(3),
libarchive(3)</p>
d478 1
a478 1
<p style="margin-left:6%;">The <b>libarchive</b> library
d486 1
a486 1
<p style="margin-left:6%;">The <b>libarchive</b> library
d492 1
a492 1
<p style="margin-left:6%;">The &ldquo;standard&rdquo; user
d494 4
a497 4
because getgrgid(3) and getpwuid(3) are sometimes too large
for particular applications. The current design allows the
application author to use a more compact implementation when
appropriate.</p>
d499 1
a499 1
<p style="margin-left:6%; margin-top: 1em">The full list of
d504 1
a504 1
<p style="margin-left:6%; margin-top: 1em">The
d511 1
a511 1
<p style="margin-left:6%; margin-top: 1em">This API should
d513 5
a517 6
would make it a direct parallel of the archive_read(3) API.
When such methods are implemented, the &ldquo;hybrid&rdquo;
symbolic link mode will make sense.</p>

<p style="margin-left:6%; margin-top: 1em">BSD
April&nbsp;3, 2017 BSD</p>
@


1.11
log
@libarchive: updated to 3.7.4

Libarchive 3.7.4 is a bugfix and security release

Security fixes:

rar: Fix OOB in rar e8 filter (CVE-2024-26256)
zip: Fix out of boundary access

Important bugfixes:

7zip: Limit amount of properties
bsdtar: Fix error handling around strtol() usages
passphrase: Improve newline handling on Windows
passphrase: Never allow empty passwords
rar: Fix "File CRC Error" when extracting specific rar4 archives
xar: Avoid infinite link loop
zip: Update AppleDouble support for directories
zstd: Implement core detection
@
text
@d2 1
a2 1
<!-- CreationDate: Fri Apr 26 09:23:46 2024 -->
@


1.10
log
@libarchive: updated to 3.7.3

Libarchive 3.7.3 is a feature, security and bugfix release.

New features:

PCRE2 support
add trailing letter b to bsdtar(1) substitute pattern
add support for long options "--group" and "--owner" to tar(1)

Security fixes:

Fix possible vulnerability in tar error reporting introduced in f27c173

Important bugfixes:

ISO9660: preserve the natural order of links
rar5: fix decoding unicode filenames on Windows
rar5: fix infinite loop if during rar5 decompression the last block produced no data
xz filter: fix incorrect eof at the end of an lzip member
zip: fix end-of-data marker processing when decompressing zip archives
multiple bsdunzip(1) fixes
filetime truncation fix on Windows
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Apr  7 22:36:26 2024 -->
d384 1
a384 1
function will recieve data provided to the fourth parameter,
d393 1
a393 1
recieves the struct archive object, void* custom filter
@


1.9
log
@libarchive: updated to 3.7.2

Libarchive 3.7.2 is a security, bugfix and feature release.

Security fixes:

Multiple vulnerabilities have been fixed in the PAX writer (1b4e0d0)
Important bugfixes:

bsdunzip(1) now correctly handles arguments following an -x after the zipfile
New features:

bsdunzip(1) now supports the "--version" flag
7-zip reader now translates Windows permissions into UNIX permissions
uudecode filter in raw mode now supports file name and file mode
zstd filter now supports the "long" write option


Libarchive 3.7.1 is a security, feature and bugfix release.

Security fixes:

SEGV and stack buffer overflow in verbose mode of cpio
Feature updates:

bsdunzip updated to match latest upstream code
Important bugfixes:

miscellaneous functional bugfixes
build fixes on multiple platforms


Libarchive 3.7.0 is a feature and bugfix release.

New features:

bsdunzip: new tool ported from FreeBSD
drop-in replacement for Info-ZIP unzip, not yet ported for Windows
7zip reader: support for Zstandard compression
7zip reader: support for ARM64 filter
zstd filter: support for multi-frame zstd archives
Other notable bugfixes and improvements:

pax: fix year 2038 problem on platforms with 64-bit time_t
Windows: Universal Windows Platform (UWP) fixes and improvements
Windows: bcrypt usage fixes and improvements
Windows: time function usage fixes and improvements
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
@


1.8
log
@libarchive: Update to 3.4.3

Libarchive 3.4.3 is a feature and bugfix release.

New features:

    support for pzstd compressed files (#1357)
    support for RHT.security.selinux tar extended attribute (#1348)

Important bugfixes:

    various zstd fixes and improvements (#1342 #1352 #1359)
    child process handling fixes (#1372)

Libarchive 3.4.2 is a feature and security release.

New features:

    support for atomic file extraction (bsdtar -x --safe-writes) (#1289)
    support for mbed TLS (PolarSSL) (#1301)

Important bugfixes:

    security fixes in RAR5 reader (#1280 #1326)
    compression buffer fix in XAR writer (#1317)
    fix uname and gname longer than 32 characters in PAX writer (#1319)
    fix segfault when archiving hard links in ISO9660 and XAR writers (#1325)
    fix support for extracting 7z archive entries with Delta filter (#987)

Libarchive 3.4.1 is a feature and security release.

New features:

    Unicode filename support for reading lha/lzh archives
    New pax write option "xattrhdr"

Important bugfixes:

    security fixes in wide string processing (#1276 #1298)
    security fixes in RAR5 reader (#1212 #1217 #1296)
    security fixes and optimizations to write filter logic (#351)
    security fix related to use of readlink(2) (1dae5a5)
    sparse file handling fixes (#1218 #1260)

Thanks to all contributors and bug reporters.
Special thanks to Christos Zoulas (@@zoulasc) from NetBSD for the atomic file extraction feature.
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Wed May 20 01:10:06 2020 -->
d29 2
d40 9
a48 2
<b>archive_read_disk_set_standard_lookup</b> &mdash;
functions for reading objects from disk</p>
d69 12
d141 40
d196 14
d260 6
d272 5
a276 7
handling symbolic links. The
&rsquo;&rsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &rsquo;&rsquo;physical&rsquo;&rsquo;
mode does not follow any symbolic links. The
&rsquo;&rsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &rsquo;&rsquo;logical&rsquo;&rsquo;
mode.</p>
d339 59
d489 4
a492 5
<p style="margin-left:6%;">The
&rsquo;&rsquo;standard&rsquo;&rsquo; user name and group
name lookup functions are not the defaults because
getgrgid(3) and getpwuid(3) are sometimes too large for
particular applications. The current design allows the
d511 2
a512 3
When such methods are implemented, the
&rsquo;&rsquo;hybrid&rsquo;&rsquo; symbolic link mode will
make sense.</p>
@


1.7
log
@Update for libarchive-3.4.0:
- improvements for Android APK and JAR archives
- better support for non-recursive list and extract
- tar --exclude-vcs support
- fixes for file attributes and flags handling
- zipx support
- rar 5.0 reader
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
d146 1
a146 1
nodump file atrribute is ignored.</p>
d169 1
a169 1
By defaut, moint points are traversed.</p>
d191 7
a197 5
handling symbolic links. The &ldquo;logical&rdquo; mode
follows all symbolic links. The &ldquo;physical&rdquo; mode
does not follow any symbolic links. The &ldquo;hybrid&rdquo;
mode currently behaves identically to the
&ldquo;logical&rdquo; mode.</p>
d256 1
a256 1
group names using the currently registered lookup functions
d264 1
a264 1
<p style="margin-top: 1em"><b>EXAMPLE</b></p>
d331 1
a331 1
<p style="margin-left:6%;">archive_read(3),
d333 1
a333 1
tar(1), libarchive(3)</p>
d351 5
a355 4
<p style="margin-left:6%;">The &ldquo;standard&rdquo; user
name and group name lookup functions are not the defaults
because getgrgid(3) and getpwuid(3) are sometimes too large
for particular applications. The current design allows the
d374 3
a376 2
When such methods are implemented, the &ldquo;hybrid&rdquo;
symbolic link mode will make sense.</p>
@


1.6
log
@libarchive: updated to 3.3.3

libarchive 3.3.3:
Avoid super-linear slowdown on malformed mtree files
Many fixes for building with Visual Studio
NO_OVERWRITE doesn't change existing directory attributes
New support for Zstandard read and write filters
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Mon Sep  3 22:55:07 2018 -->
d191 5
a195 7
handling symbolic links. The
&rsquo;&rsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &rsquo;&rsquo;physical&rsquo;&rsquo;
mode does not follow any symbolic links. The
&rsquo;&rsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &rsquo;&rsquo;logical&rsquo;&rsquo;
mode.</p>
d349 4
a352 5
<p style="margin-left:6%;">The
&rsquo;&rsquo;standard&rsquo;&rsquo; user name and group
name lookup functions are not the defaults because
getgrgid(3) and getpwuid(3) are sometimes too large for
particular applications. The current design allows the
d371 2
a372 3
When such methods are implemented, the
&rsquo;&rsquo;hybrid&rsquo;&rsquo; symbolic link mode will
make sense.</p>
@


1.5
log
@Merge for libarchive-3.3.2.
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
@


1.4
log
@Merge libarchive-3.3.1.
@
text
@d2 1
a2 1
<!-- CreationDate: Sat Feb 25 11:22:03 2017 -->
d29 1
d38 2
a39 4
<b>archive_read_disk_set_standard_lookup</b>,
<b>archive_read_close</b>, <b>archive_read_finish</b>,
<b>archive_read_free</b> &mdash; functions for reading
objects from disk</p>
d60 6
d120 23
a142 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d144 3
d148 1
a148 1
<p style="margin-left:12%;"><b>archive_read_close</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d150 3
a152 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d154 1
d156 2
a157 1
<p style="margin-left:12%;"><b>archive_read_finish</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d159 1
a159 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d161 4
d166 1
a166 1
<p style="margin-left:12%;"><b>archive_read_free</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d168 2
a169 1
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
d171 1
a171 4
<p style="margin-left:6%;">These functions provide an API
for reading information about objects on disk. In
particular, they provide an interface for populating struct
archive_entry objects.</p>
d173 5
d179 1
a179 1
<p style="margin-top: 1em"><b>archive_read_disk_new</b>()</p>
d181 3
a183 3
<p style="margin-left:17%;">Allocates and initializes a
struct archive object suitable for reading object
information from disk.</p>
d192 2
a193 2
&lsquo;&lsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &lsquo;&lsquo;physical&rsquo;&rsquo;
d195 2
a196 2
&lsquo;&lsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &lsquo;&lsquo;logical&rsquo;&rsquo;
a259 17
<p style="margin-top: 1em"><b>archive_read_close</b>()</p>

<p style="margin-left:17%;">Does nothing for
archive_read_disk handles.</p>


<p style="margin-top: 1em"><b>archive_read_finish</b>()</p>

<p style="margin-left:17%;">This is a deprecated synonym
for <b>archive_read_free</b>().</p>

<p style="margin-top: 1em"><b>archive_read_free</b>()</p>

<p style="margin-left:17%;">Invokes
<b>archive_read_close</b>() if it was not invoked manually,
then releases all resources.</p>

d352 1
a352 1
&lsquo;&lsquo;standard&rsquo;&rsquo; user name and group
d375 1
a375 1
&lsquo;&lsquo;hybrid&rsquo;&rsquo; symbolic link mode will
d379 1
a379 1
December&nbsp;30, 2016 BSD</p>
@


1.3
log
@Update for libarchive 3.2.1.
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
d73 2
a74 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d80 2
a81 1
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
d151 2
a152 2
&rsquo;&rsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &rsquo;&rsquo;physical&rsquo;&rsquo;
d154 2
a155 2
&rsquo;&rsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &rsquo;&rsquo;logical&rsquo;&rsquo;
d328 1
a328 1
&rsquo;&rsquo;standard&rsquo;&rsquo; user name and group
d351 1
a351 1
&rsquo;&rsquo;hybrid&rsquo;&rsquo; symbolic link mode will
d355 1
a355 1
February&nbsp;2, 2012 BSD</p>
@


1.2
log
@Changes 3.1.2:
This is a maintenance update to fix issues with the new RAR seeking
feature. This new release also contains fixes for build failures when
building libarchive using Visual Studio 2012 and MinGW.
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.21 -->
<!-- CreationDate: Sat Feb  9 12:24:04 2013 -->
d320 2
a321 2
was written by Tim Kientzle &lang;
kientzle@@FreeBSD.org&rang; .</p>
@


1.1
log
@Initial revision
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:31 2010 -->
d11 4
a14 3
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
d23 2
a24 2
<p valign="top">archive_read_disk(3) FreeBSD Library
Functions Manual archive_read_disk(3)</p>
d26 1
a26 1
<p style="margin-top: 1em" valign="top"><b>NAME</b></p>
d28 1
a28 1
<p style="margin-left:8%;"><b>archive_read_disk_new</b>,
d38 3
a40 2
<b>archive_read_close</b>, <b>archive_read_finish</b>
&mdash; functions for reading objects from disk</p>
d42 1
d44 2
a45 1
<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>
d47 3
a49 1
<p style="margin-left:8%;"><b>#include
d52 1
a52 1
<p style="margin-left:8%; margin-top: 1em"><i>struct
d56 1
a56 1
<p style="margin-left:14%;"><b>archive_read_disk_new</b>(<i>void</i>);</p>
d58 1
a58 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d61 1
a61 1
<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_logical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d63 1
a63 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d66 1
a66 1
<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_physical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d68 1
a68 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d71 1
a71 1
<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d73 1
a73 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d76 1
a76 1
<p style="margin-left:14%;"><b>archive_read_disk_gname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d79 1
a79 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d82 1
a82 1
<p style="margin-left:14%;"><b>archive_read_disk_uname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d85 1
a85 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d88 1
a88 1
<p valign="top"><b>archive_read_disk_set_gname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d93 1
a93 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d96 1
a96 1
<p valign="top"><b>archive_read_disk_set_uname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d101 1
a101 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d104 1
a104 1
<p style="margin-left:14%;"><b>archive_read_disk_set_standard_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d106 1
a106 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d109 1
a109 1
<p valign="top"><b>archive_read_disk_entry_from_file</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d113 2
a114 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d116 1
d118 1
a118 1
<p style="margin-left:14%;"><b>archive_read_close</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
a119 1
<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>
d121 1
d123 1
a123 1
<p style="margin-left:14%;"><b>archive_read_finish</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d126 1
a126 1
<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>
d128 3
a130 1
<p style="margin-left:8%;">These functions provide an API
d136 1
a136 1
<p style="margin-top: 1em" valign="top"><b>archive_read_disk_new</b>()</p>
d138 1
a138 1
<p style="margin-left:20%;">Allocates and initializes a
d143 1
a143 1
<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_symlink_logical</b>(),
d147 1
a147 1
<p style="margin-left:20%;">This sets the mode used for
d149 2
a150 2
&lsquo;&lsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &lsquo;&lsquo;physical&rsquo;&rsquo;
d152 2
a153 2
&lsquo;&lsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &lsquo;&lsquo;logical&rsquo;&rsquo;
d157 1
a157 1
<p style="margin-top: 1em" valign="top"><b>archive_read_disk_gname</b>(),
d160 1
a160 1
<p style="margin-left:20%;">Returns a user or group name
d165 1
a165 1
<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_gname_lookup</b>(),
d168 1
a168 1
<p style="margin-left:20%;">These allow you to override the
d176 1
a176 1
<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_standard_lookup</b>()</p>
d178 1
a178 1
<p style="margin-left:20%;">This convenience function
d180 5
a184 5
functions. These functions use getpwid(3) and getgrid(3) to
convert ids to names, defaulting to NULL if the names cannot
be looked up. These functions also implement a simple memory
cache to reduce the number of calls to getpwid(3) and
getgrid(3).</p>
d187 1
a187 1
<p style="margin-top: 1em" valign="top"><b>archive_read_disk_entry_from_file</b>()</p>
d189 1
a189 1
<p style="margin-left:20%;">Populates a struct
d196 1
a196 1
<p style="margin-left:20%; margin-top: 1em">Information is
d202 1
a202 1
<p style="margin-left:20%; margin-top: 1em">If a pointer to
d211 1
a211 1
<p style="margin-left:20%; margin-top: 1em">Where
d217 4
a221 1
<p style="margin-top: 1em" valign="top"><b>archive_read_close</b>()</p>
d223 1
a223 2
<p style="margin-left:20%;">This currently does
nothing.</p>
d225 2
d228 1
a228 1
<p style="margin-top: 1em" valign="top"><b>archive_write_finish</b>()</p>
d230 2
a231 2
<p style="margin-left:20%;">Invokes
<b>archive_write_close</b>() if it was not invoked manually,
d234 1
a234 1
<p style="margin-left:8%;">More information about the
d238 1
a238 1
<p style="margin-top: 1em" valign="top"><b>EXAMPLE</b></p>
d240 1
a240 1
<p style="margin-left:8%;">The following illustrates basic
d244 1
a244 1
<p style="margin-left:17%; margin-top: 1em">void <br>
d253 1
a253 1
<p style="margin-left:17%; margin-top: 1em">ard =
d260 1
a260 1
archive_entry_copy_sourcepath(entry, name); <br>
d268 1
a268 1
archive_read_finish(ard); <br>
d272 1
a272 2
<p style="margin-top: 1em" valign="top"><b>RETURN
VALUES</b></p>
d274 1
a274 1
<p style="margin-left:8%;">Most functions return
d281 1
a281 4
operations impossible. The archive_errno(3) and
archive_error_string(3) functions can be used to retrieve an
appropriate error code and a textual error message. (See
archive_util(3) for details.)</p>
d284 1
a284 1
<p style="margin-left:8%; margin-top: 1em"><b>archive_read_disk_new</b>()
d289 1
a289 1
<p style="margin-left:8%; margin-top: 1em"><b>archive_read_disk_gname</b>()
d297 1
a297 1
<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>
d299 3
a301 3
<p style="margin-left:8%;">archive_read(3),
archive_write(3), archive_write_disk(3), tar(1),
libarchive(3)</p>
d303 1
a303 1
<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>
d305 7
a311 1
<p style="margin-left:8%;">The <b>libarchive</b> library
d317 1
a317 1
<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>
d319 3
a321 3
<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@@freebsd.org&rang;.</p>
d323 1
a323 1
<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>
d325 2
a326 2
<p style="margin-left:8%;">The
&lsquo;&lsquo;standard&rsquo;&rsquo; user name and group
d328 1
a328 1
getgrid(3) and getpwid(3) are sometimes too large for
d333 1
a333 1
<p style="margin-left:8%; margin-top: 1em">The full list of
d338 1
a338 1
<p style="margin-left:8%; margin-top: 1em">The
d345 1
a345 1
<p style="margin-left:8%; margin-top: 1em">This API should
d349 1
a349 1
&lsquo;&lsquo;hybrid&rsquo;&rsquo; symbolic link mode will
d352 2
a353 3

<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
March&nbsp;10, 2009 FreeBSD&nbsp;8.0</p>
@


1.1.1.1
log
@Import libarchive 2.8.0:
- Infrastructure:
  - Allow command line tools as fallback for missing compression
    libraries. If compiled without gzip for example, gunzip will
    be used automatically.
  - Improved support for a number of platforms like high-resolution
    timestamps and Extended Attributes on various Unix systems
  - New convience interface for creating archives based on disk content,
    complement of the archive_write_disk interface.
- Frontends:
  - bsdcpio ready for public consumption
  - hand-written date parser replaces the yacc code
- Filter system:
  - Simplified read filter chains
  - Option support for filters
  - LZMA, XZ, uudecode handled
- Format support:
  - Write support for mtree files based on file system or archive
    content
  - Basic read support for Joliet
  - Write support for zip files
  - Write support for shar archives, both text-only and binary-safe
@
text
@@


1.1.1.2
log
@libarchive-2.8.2:
- Fix NULL deference for short self-extracting zip archives
- Don't dereference symlinks on Linux when reading ACLs
- Better detection of SHA2 support for old OpenSSL versions
- Fix parsing of input files for bsdtar -T
- Do not leak setup_xattr into the global namespace
- Fix build when an older libarchive is already installed
- Use O_BINARY opening files in bsdtar
- Include missing archive_crc32.h
- Correctly include iconv.h required by libxml2
@
text
@d1 341
a341 765
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Sun Mar 14 02:49:16 2010
%%DocumentNeededResources: font Times-Roman
%%DocumentSuppliedResources: procset grops 1.19 2
%%Pages: 53
%%PageOrder: Ascend
%%DocumentMedia: Default 612 792 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.19 2
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
}bind def
/PEND{
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Roman
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Roman@@0 ENC0/Times-Roman RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q
(March 10, 2009 archi)74.5 48 Q -.15(ve)-.25 G(_read_disk 3).15 E
(</title>)36 72 Q 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36
24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48
Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E
(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E
(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q
(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S
(ME).35 E(</h3>)36 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_read_disk_ne).15
E(w</b>,)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_disk_set_symlink_logical</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25
G(_read_disk_set_symlink_ph).15 E(ysical</b>,)-.05 E 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_set_symlink_h).15 E(ybrid</b>,)-.05 E(<b>archi)0 24 Q -.15
(ve)-.25 G(_read_disk_entry_from_\214le</b>,).15 E(<b>archi)0 36 Q -.15
(ve)-.25 G(_read_disk_gname</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G
(_read_disk_uname</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_disk_set_uname_lookup</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G
(_read_disk_set_gname_lookup</b>,).15 E 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_set_standard_lookup</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25
G(_read_close</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_\214nish</b>).15 E 2.5(-f)0 48 S
(unctions for reading objects from disk)-2.5 E(<h3 id="SYNOPSIS">)36 60
Q(SYNOPSIS)36 72 Q 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h3>)36 12 Q
(<br><br><code></code><code>struct</code><code> archi)0 24 Q -.15(ve)
-.25 G(</code><code> *</code>).15 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_disk_ne).15 E(w</b>\(<code></code><code>v)-.25 E(oid</code>\))-.2
E(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve)
-.25 G
(_read_disk_set_symlink_logical</b>\(<code></code><code>struct archi).15
E .3 -.15(ve *)-.25 H(</code>\)).15 E
(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_set_symlink_ph).15 E
(ysical</b>\(<code></code><code>struct archi)-.05 E .3 -.15(ve *)-.25 H
(</code>\)).15 E(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0
36 Q -.15(ve)-.25 G(_read_disk_set_symlink_h).15 E
(ybrid</b>\(<code></code><code>struct archi)-.05 E .3 -.15(ve *)-.25 H
(</code>\)).15 E(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0
60 Q -.15(ve)-.25 G
(_read_disk_gname</b>\(<code></code><code>struct archi).15 E .3 -.15
(ve *)-.25 H(</code><code>, gid_t</code>\)).15 E
(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_uname</b>\(<code></code><code>struct archi).15 E .3 -.15
(ve *)-.25 H(</code><code>, uid_t</code>\)).15 E
(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve)
-.25 G(_read_disk_set_gname_lookup</b>\(<code></code>).15 E
(<code></code><code>struct archi)0 48 Q .3 -.15(ve *)-.25 H(</code>).15
E(<code></code><code>v)0 60 Q(oid *</code>)-.2 E
(<code></code><code>const char *\(*lookup\)\(v)0 72 Q
(oid *, gid_t\)</code>)-.2 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<code></code><code>v)0 12 Q(oid \(*cleanup\)\(v)
-.2 E(oid *\)</code>)-.2 E(\))0 24 Q
(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q -.15(ve)
-.25 G(_read_disk_set_uname_lookup</b>\(<code></code>).15 E
(<code></code><code>struct archi)0 60 Q .3 -.15(ve *)-.25 H(</code>).15
E(<code></code><code>v)0 72 Q(oid *</code>)-.2 E 0 Cg EP
%%Page: 11 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<code></code><code>const char *\(*lookup\)\(v)0
12 Q(oid *, uid_t\)</code>)-.2 E(<code></code><code>v)0 24 Q
(oid \(*cleanup\)\(v)-.2 E(oid *\)</code>)-.2 E(\))0 36 Q
(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve)
-.25 G
(_read_disk_set_standard_lookup</b>\(<code></code><code>struct archi).15
E .3 -.15(ve *)-.25 H(</code>\)).15 E
(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_entry_from_\214le</b>\(<code></code>).15 E
(<code></code><code>struct archi)0 24 Q .3 -.15(ve *)-.25 H(</code>).15
E(<code></code><code>struct archi)0 36 Q -.15(ve)-.25 G(_entry *</code>)
.15 E(<code></code><code>int fd</code>)0 48 Q
(<code></code><code>const struct stat *</code>)0 60 Q(\))0 72 Q 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<br><br><code></code><code>int</code>)0 12 Q
(<b>archi)0 24 Q -.15(ve)-.25 G
(_read_close</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *)
-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 36 Q
(<b>archi)0 48 Q -.15(ve)-.25 G
(_read_\214nish</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *)
-.25 H(</code>\)).15 E(<h3 id="DESCRIPTION">)36 60 Q(DESCRIPTION)36 72 Q
0 Cg EP
%%Page: 14 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h3>)36 12 Q(These functions pro)0 24 Q
(vide an API for reading information about)-.15 E(objects on disk.)0 36
Q(In particular)0 48 Q 2.5(,t)-.4 G(he)-2.5 E 2.5(yp)-.15 G(ro)-2.5 E
(vide an interf)-.15 E(ace for populating)-.1 E(<font size="-1"></font>\
<font size="-1">struct</font><font size="-1"> archi)0 60 Q -.15(ve)-.25
G(_entry</font>).15 E(objects.)0 72 Q 0 Cg EP
%%Page: 15 15
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dl compact>)0 12 Q(<p><dt><b>archi)0 24 Q -.15
(ve)-.25 G(_read_disk_ne).15 E(w</b>\(<code></code>\)<dd>)-.25 E
(Allocates and initializes a)0 36 Q(<font size="-1"></font><font size="\
-1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G(</font>)
.15 E(object suitable for reading object information from disk.)0 60 Q
(<p><dt>Xo<dd>)0 72 Q 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_set_symlink_logical</b>\(<code></code>\),).15 E(<b>archi)0
24 Q -.15(ve)-.25 G(_read_disk_set_symlink_ph).15 E
(ysical</b>\(<code></code>\),)-.05 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_disk_set_symlink_h).15 E(ybrid</b>\(<code></code>\))-.05 E
(This sets the mode used for handling symbolic links.)0 48 Q(The)0 60 Q
-.74(``)0 72 S(logical').74 E(')-.74 E 0 Cg EP
%%Page: 17 17
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(mode follo)0 12 Q(ws all symbolic links.)-.25 E
(The)0 24 Q -.74(``)0 36 S(ph).74 E(ysical')-.05 E(')-.74 E
(mode does not follo)0 48 Q 2.5(wa)-.25 G .3 -.15(ny s)-2.5 H
(ymbolic links.).15 E(The)0 60 Q -.74(``)0 72 S -.05(hy).74 G(brid').05
E(')-.74 E 0 Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(mode currently beha)0 12 Q -.15(ve)-.2 G 2.5(si)
.15 G(dentically to the)-2.5 E -.74(``)0 24 S(logical').74 E(')-.74 E
(mode.)0 36 Q(<p><dt>Xo<dd>)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_disk_gname</b>\(<code></code>\),).15 E(<b>archi)0 72 Q -.15(ve)
-.25 G(_read_disk_uname</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Returns a user or group name gi)0 12 Q -.15(ve)
-.25 G 2.5(nag).15 G(id or uid v)-2.5 E(alue.)-.25 E(By def)0 24 Q
(ault, these al)-.1 E -.1(wa)-.1 G(ys return a NULL string.).1 E
(<p><dt>Xo<dd>)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G
(_read_disk_set_gname_lookup</b>\(<code></code>\),).15 E(<b>archi)0 60 Q
-.15(ve)-.25 G(_read_disk_set_uname_lookup</b>\(<code></code>\)).15 E
(These allo)0 72 Q 2.5(wy)-.25 G(ou to o)-2.5 E -.15(ve)-.15 G
(rride the functions used for).15 E 0 Cg EP
%%Page: 20 20
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(user and group name lookups.)0 12 Q -1.1(Yo)0 24
S 2.5(um)1.1 G(ay also pro)-2.5 E(vide a)-.15 E
(<font size="-1"></font><font size="-1">v)0 36 Q
(oid</font><font size="-1"> *</font>)-.2 E(pointer to a pri)0 48 Q -.25
(va)-.25 G(te data structure and a cleanup function for).25 E
(that data.)0 60 Q(The cleanup function will be in)0 72 Q -.2(vo)-.4 G
-.1(ke).2 G 2.5(dw).1 G(hen the)-2.5 E 0 Cg EP
%%Page: 21 21
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<font size="-1"></font><font size="-1">struct</\
font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(</font>).15 E
(object is destro)0 24 Q(yed or when ne)-.1 E 2.5(wl)-.25 G
(ookup functions are re)-2.5 E(gistered.)-.15 E(<p><dt><b>archi)0 36 Q
-.15(ve)-.25 G(_read_disk_set_standard_lookup</b>\(<code></code>\)<dd>)
.15 E(This con)0 48 Q -.15(ve)-.4 G
(nience function installs a standard set of user).15 E
(and group name lookup functions.)0 60 Q(These functions use)0 72 Q 0 Cg
EP
%%Page: 22 22
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(<a href="../html3/getpwid.html">getpwid\(3\)</a>)0 12 Q(and)0 24 Q
(<a href="../html3/getgrid.html">getgrid\(3\)</a>)0 36 Q(to con)0 48 Q
-.15(ve)-.4 G(rt ids to names, def).15 E
(aulting to NULL if the names cannot)-.1 E(be look)0 60 Q(ed up.)-.1 E
(These functions also implement a simple memory cache to reduce)0 72 Q 0
Cg EP
%%Page: 23 23
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(the number of calls to)0 12 Q
(<a href="../html3/getpwid.html">getpwid\(3\)</a>)0 24 Q(and)0 36 Q
(<a href="../html3/getgrid.html">getgrid\(3\)</a>.)0 48 Q
(<p><dt><b>archi)0 60 Q -.15(ve)-.25 G
(_read_disk_entry_from_\214le</b>\(<code></code>\)<dd>).15 E
(Populates a)0 72 Q 0 Cg EP
%%Page: 24 24
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<font size="-1"></font><font size="-1">struct</\
font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(_entry</font>).15 E
(object with information about a particular \214le.)0 24 Q(The)0 36 Q
(<font size="-1"></font><font size="-1">archi)0 48 Q -.15(ve)-.25 G
(_entry</font>).15 E(object must ha)0 60 Q .3 -.15(ve a)-.2 H
(lready been created with).15 E(<a href="../html3/archi)0 72 Q -.15(ve)
-.25 G(_entry_ne).15 E -.65(w.)-.25 G(html">archi).65 E -.15(ve)-.25 G
(_entry_ne).15 E(w\(3\)</a>)-.25 E 0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and at least one of the source path or path \
\214elds must already be set.)0 12 Q
(\(If both are set, the source path will be used.\))0 24 Q(<p>)36 36 Q
(Information is read from disk using the path name from the)0 48 Q(<fon\
t size="-1"></font><font size="-1">struct</font><font size="-1"> archi)0
60 Q -.15(ve)-.25 G(_entry</font>).15 E(object.)0 72 Q 0 Cg EP
%%Page: 26 26
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(If a \214le descriptor is pro)0 12 Q
(vided, some information will be obtained using)-.15 E
(that \214le descriptor)0 24 Q 2.5(,o)-.4 G 2.5(np)-2.5 G
(latforms that support the appropriate)-2.5 E(system calls.)0 36 Q(<p>)
36 48 Q(If a pointer to a)0 60 Q(<font size="-1"></font><font size="-1"\
>struct</font><font size="-1"> stat</font>)0 72 Q 0 Cg EP
%%Page: 27 27
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(is pro)0 12 Q
(vided, information from that structure will be used instead)-.15 E
(of reading from the disk where appropriate.)0 24 Q(This can pro)0 36 Q
(vide performance bene\214ts in scenarios where)-.15 E(<font size="-1">\
</font><font size="-1">struct</font><font size="-1"> stat</font>)0 48 Q
(information has already been read from the disk as a side ef)0 60 Q
(fect)-.25 E(of some other operation.)0 72 Q 0 Cg EP
%%Page: 28 28
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(F)0 12 Q(or e)-.15 E(xample, directory tra)
-.15 E -.15(ve)-.2 G(rsal libraries often pro).15 E
(vide this information.\))-.15 E(<p>)36 24 Q(Where necessary)0 36 Q 2.5
(,u)-.65 G(ser and group ids are con)-2.5 E -.15(ve)-.4 G
(rted to user and group names).15 E(using the currently re)0 48 Q
(gistered lookup functions abo)-.15 E -.15(ve)-.15 G(.).15 E(This af)0
60 Q(fects the \214le o)-.25 E(wnership \214elds and A)-.25 E(CL v)-.4 E
(alues in the)-.25 E(<font size="-1"></font><font size="-1">struct</fon\
t><font size="-1"> archi)0 72 Q -.15(ve)-.25 G(_entry</font>).15 E 0 Cg
EP
%%Page: 29 29
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(object.)0 12 Q(<p><dt><b>archi)0 24 Q -.15(ve)
-.25 G(_read_close</b>\(<code></code>\)<dd>).15 E
(This currently does nothing.)0 36 Q(<p><dt><b>archi)0 48 Q -.15(ve)-.25
G(_write_\214nish</b>\(<code></code>\)<dd>).15 E(In)0 60 Q -.2(vo)-.4 G
-.1(ke).2 G(s).1 E(<b>archi)0 72 Q -.15(ve)-.25 G
(_write_close</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 30 30
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(if it w)0 12 Q(as not in)-.1 E -.2(vo)-.4 G -.1
(ke).2 G 2.5(dm).1 G(anually)-2.5 E 2.5(,t)-.65 G
(hen releases all resources.)-2.5 E(</dl>)0 24 Q
(More information about the)0 36 Q(<i></i><i>struct</i><i> archi)0 48 Q
-.15(ve)-.25 G(</i>).15 E(object and the o)0 60 Q -.15(ve)-.15 G
(rall design of the library can be found in the).15 E
(<a href="../html3/libarchi)0 72 Q -.15(ve)-.25 G(.html">libarchi).15 E
-.15(ve)-.25 G(\(3\)</a>).15 E 0 Cg EP
%%Page: 31 31
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.15(ove)0 12 S(rvie).15 E -.65(w.)-.25 G
(<h3 id="EXAMPLE">)36 24 Q(EXAMPLE)36 36 Q(</h3>)36 48 Q(The follo)0 60
Q(wing illustrates basic usage of the library by)-.25 E(sho)0 72 Q
(wing ho)-.25 E 2.5(wt)-.25 G 2.5(ou)-2.5 G(se it to cop)-2.5 E 2.5(ya)
-.1 G 2.5(ni)-2.5 G(tem on disk into an archi)-2.5 E -.15(ve)-.25 G(.)
.15 E 0 Cg EP
%%Page: 32 32
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dl compact><dt><dd>)0 12 Q(<code>)0 24 Q(<pre>)
0 36 Q -.2(vo)0 48 S(id).2 E(\214le_to_archi)0 60 Q -.15(ve)-.25 G
(\(struct archi).15 E .3 -.15(ve *)-.25 H(a, const char *name\)).15 E({)
0 72 Q 0 Cg EP
%%Page: 33 33
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char b)5 12 Q(uf)-.2 E(f[8192];)-.25 E
(size_t bytes_read;)5 24 Q(struct archi)5 36 Q .3 -.15(ve *)-.25 H(ard;)
.15 E(struct archi)5 48 Q -.15(ve)-.25 G(_entry *entry;).15 E(int fd;)5
60 Q(<p>)36 72 Q 0 Cg EP
%%Page: 34 34
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(ard = archi)5 12 Q -.15(ve)-.25 G(_read_disk_ne)
.15 E(w\(\);)-.25 E(archi)5 24 Q -.15(ve)-.25 G
(_read_disk_set_standard_lookup\(ard\);).15 E(entry = archi)5 36 Q -.15
(ve)-.25 G(_entry_ne).15 E(w\(\);)-.25 E(fd = open\(name, O_RDONL)5 48 Q
(Y\);)-1 E(if \(fd < 0\))5 60 Q(return;)12.5 72 Q 0 Cg EP
%%Page: 35 35
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(archi)5 12 Q -.15(ve)-.25 G(_entry_cop).15 E
(y_sourcepath\(entry)-.1 E 2.5(,n)-.65 G(ame\);)-2.5 E(archi)5 24 Q -.15
(ve)-.25 G(_read_disk_entry_from_\214le\(ard, entry).15 E 2.5(,f)-.65 G
(d, NULL\);)-2.5 E(archi)5 36 Q -.15(ve)-.25 G
(_write_header\(a, entry\);).15 E(while \(\(bytes_read = read\(fd, b)5
48 Q(uf)-.2 E(f, sizeof\(b)-.25 E(uf)-.2 E(f\)\)\) > 0\))-.25 E(archi)10
60 Q -.15(ve)-.25 G(_write_data\(a, b).15 E(uf)-.2 E(f, bytes_read\);)
-.25 E(archi)5 72 Q -.15(ve)-.25 G(_write_\214nish_entry\(a\);).15 E 0
Cg EP
%%Page: 36 36
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(archi)5 12 Q -.15(ve)-.25 G
(_read_\214nish\(ard\);).15 E(archi)5 24 Q -.15(ve)-.25 G
(_entry_free\(entry\);).15 E(})0 36 Q(</pre>)0 48 Q(</code>)0 60 Q
(</dl>)0 72 Q 0 Cg EP
%%Page: 37 37
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="RETURN V)36 12 Q(ALUES">)-1.35 E
(RETURN V)36 24 Q(ALUES)-1.35 E(</h3>)36 36 Q(Most functions return)0 48
Q(<b></b><b>ARCHIVE_OK</b>)0 60 Q(\(zero\) on success, or one of se)0 72
Q -.15(ve)-.25 G(ral ne).15 E -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G 0
Cg EP
%%Page: 38 38
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(error codes for errors.)0 12 Q
(Speci\214c error codes include:)0 24 Q(<b></b><b>ARCHIVE_RETR)0 36 Q
(Y</b>)-.65 E(for operations that might succeed if retried,)0 48 Q
(<b></b><b>ARCHIVE_W)0 60 Q(ARN</b>)-1.2 E
(for unusual conditions that do not pre)0 72 Q -.15(ve)-.25 G
(nt further operations, and).15 E 0 Cg EP
%%Page: 39 39
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>ARCHIVE_F)0 12 Q -1.21 -1.11(AT A)-.74
H(L</b>)1.11 E(for serious errors that mak)0 24 Q 2.5(er)-.1 G
(emaining operations impossible.)-2.5 E(The)0 36 Q
(<a href="../html3/archi)0 48 Q -.15(ve)-.25 G(_errno.html">archi).15 E
-.15(ve)-.25 G(_errno\(3\)</a>).15 E(and)0 60 Q(<a href="../html3/archi)
0 72 Q -.15(ve)-.25 G(_error_string.html">archi).15 E -.15(ve)-.25 G
(_error_string\(3\)</a>).15 E 0 Cg EP
%%Page: 40 40
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(functions can be used to retrie)0 12 Q .3 -.15
(ve a)-.25 H 2.5(na).15 G(ppropriate error code and a)-2.5 E(te)0 24 Q
(xtual error message.)-.15 E(\(See)0 36 Q(<a href="../html3/archi)0 48 Q
-.15(ve)-.25 G(_util.html">archi).15 E -.15(ve)-.25 G(_util\(3\)</a>).15
E(for details.\))0 60 Q(<p>)36 72 Q 0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_read_disk_ne).15
E(w</b>\(<code></code>\))-.25 E(returns a pointer to a ne)0 24 Q
(wly-allocated)-.25 E(<font size="-1"></font><font size="-1">struct</fo\
nt><font size="-1"> archi)0 36 Q -.15(ve)-.25 G(</font>).15 E
(object or NULL if the allocation f)0 48 Q(ailed for an)-.1 E 2.5(yr)
-.15 G(eason.)-2.5 E(<p>)36 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G
(_read_disk_gname</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_read_disk_uname</b>\(<code></code>\)).15 E(return)0 36 Q(<font size="\
-1"></font><font size="-1">const</font><font size="-1"> char</font><fon\
t size="-1"> *</font>)0 48 Q(pointers to the te)0 60 Q
(xtual name or NULL if the lookup f)-.15 E(ailed for an)-.1 E 2.5(yr)
-.15 G(eason.)-2.5 E
(The returned pointer points to internal storage that)0 72 Q 0 Cg EP
%%Page: 43 43
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(may be reused on the ne)0 12 Q
(xt call to either of these functions;)-.15 E(callers should cop)0 24 Q
2.5(yt)-.1 G(he string if the)-2.5 E 2.5(yn)-.15 G
(eed to continue accessing it.)-2.5 E(<p>)36 36 Q(<h3 id="SEE ALSO">)36
48 Q(SEE ALSO)36 60 Q(</h3>)36 72 Q 0 Cg EP
%%Page: 44 44
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<a href="../html3/archi)0 12 Q -.15(ve)-.25 G
(_read.html">archi).15 E -.15(ve)-.25 G(_read\(3\)</a>,).15 E
(<a href="../html3/archi)0 24 Q -.15(ve)-.25 G(_write.html">archi).15 E
-.15(ve)-.25 G(_write\(3\)</a>,).15 E(<a href="../html3/archi)0 36 Q
-.15(ve)-.25 G(_write_disk.html">archi).15 E -.15(ve)-.25 G
(_write_disk\(3\)</a>,).15 E(<a href="../html1/tar)0 48 Q
(.html">tar\(1\)</a>,)-.55 E(<a href="../html3/libarchi)0 60 Q -.15(ve)
-.25 G(.html">libarchi).15 E -.15(ve)-.25 G(\(3\)</a>).15 E
(<h3 id="HIST)36 72 Q(OR)-.18 E(Y">)-.65 E 0 Cg EP
%%Page: 45 45
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(HIST)36 12 Q(OR)-.18 E(Y)-.65 E(</h3>)36 24 Q
(The)0 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b>).15 E
(library \214rst appeared in)0 60 Q(FreeBSD5.3.)0 72 Q 0 Cg EP
%%Page: 46 46
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_read_disk</b>).15 E(interf)0 36 Q(ace w)-.1 E(as added to)-.1 E
(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b><b>2.6</b>).15 E
(and \214rst appeared in)0 60 Q(FreeBSD8.0.)0 72 Q 0 Cg EP
%%Page: 47 47
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="A)36 12 Q(UTHORS">)-.55 E -.55(AU)36 24
S(THORS).55 E(</h3>)36 36 Q(<p>)36 48 Q(The)0 60 Q(<b>libarchi)0 72 Q
-.15(ve)-.25 G(</b>).15 E 0 Cg EP
%%Page: 48 48
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(library w)0 12 Q(as written by)-.1 E -.35(Ti)0
24 S 2.5(mK).35 G(ientzle &lt;kientzle@@freebsd.or)-2.5 E(g&gt;.)-.18 E
(<h3 id="B)36 36 Q(UGS">)-.1 E -.1(BU)36 48 S(GS).1 E(</h3>)36 60 Q(The)
0 72 Q 0 Cg EP
%%Page: 49 49
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(standard').74 E(')-.74 E
(user name and group name lookup functions are not the def)0 24 Q
(aults because)-.1 E(<a href="../html3/getgrid.html">getgrid\(3\)</a>)0
36 Q(and)0 48 Q(<a href="../html3/getpwid.html">getpwid\(3\)</a>)0 60 Q
(are sometimes too lar)0 72 Q(ge for particular applications.)-.18 E 0
Cg EP
%%Page: 50 50
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The current design allo)0 12 Q
(ws the application author to use a more)-.25 E
(compact implementation when appropriate.)0 24 Q(<p>)36 36 Q
(The full list of metadata read from disk by)0 48 Q(<b>archi)0 60 Q -.15
(ve)-.25 G(_read_disk_entry_from_\214le</b>\(<code></code>\)).15 E
(is necessarily system-dependent.)0 72 Q 0 Cg EP
%%Page: 51 51
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(The)0 24 Q(<b>archi)0 36 Q -.15(ve)
-.25 G(_read_disk_entry_from_\214le</b>\(<code></code>\)).15 E
(function reads as much information as it can from disk.)0 48 Q
(Some method should be pro)0 60 Q
(vided to limit this so that clients who)-.15 E(do not need A)0 72 Q
(CLs, for instance, can a)-.4 E -.2(vo)-.2 G(id the e).2 E(xtra w)-.15 E
(ork needed)-.1 E 0 Cg EP
%%Page: 52 52
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(to look up such information.)0 12 Q(<p>)36 24 Q
(This API should pro)0 36 Q(vide a set of methods for w)-.15 E
(alking a directory tree.)-.1 E(That w)0 48 Q(ould mak)-.1 E 2.5(ei)-.1
G 2.5(tad)-2.5 G(irect parallel of the)-2.5 E(<a href="../html3/archi)0
60 Q -.15(ve)-.25 G(_read.html">archi).15 E -.15(ve)-.25 G
(_read\(3\)</a>).15 E(API.)0 72 Q 0 Cg EP
%%Page: 53 53
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(When such methods are implemented, the)0 12 Q
-.74(``)0 24 S -.05(hy).74 G(brid').05 E(')-.74 E
(symbolic link mode will mak)0 36 Q 2.5(es)-.1 G(ense.)-2.5 E(</body>)0
48 Q(</html>)0 60 Q 0 Cg EP
%%Trailer
end
%%EOF
@


1.1.1.3
log
@libarchive-2.8.3: Build fix for Linux
@
text
@d1 765
a765 341
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Sun Mar 14 19:50:19 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">archive_read_disk(3) FreeBSD Library
Functions Manual archive_read_disk(3)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>archive_read_disk_new</b>,
<b>archive_read_disk_set_symlink_logical</b>,
<b>archive_read_disk_set_symlink_physical</b>,
<b>archive_read_disk_set_symlink_hybrid</b>,
<b>archive_read_disk_entry_from_file</b>,
<b>archive_read_disk_gname</b>,
<b>archive_read_disk_uname</b>,
<b>archive_read_disk_set_uname_lookup</b>,
<b>archive_read_disk_set_gname_lookup</b>,
<b>archive_read_disk_set_standard_lookup</b>,
<b>archive_read_close</b>, <b>archive_read_finish</b>
&mdash; functions for reading objects from disk</p>


<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>

<p style="margin-left:8%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:8%; margin-top: 1em"><i>struct
archive *</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_new</b>(<i>void</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_logical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_physical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_gname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>gid_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_uname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>uid_t</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_disk_set_gname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*(*lookup)(void&nbsp;*,&nbsp;gid_t)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_disk_set_uname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*(*lookup)(void&nbsp;*,&nbsp;uid_t)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_disk_set_standard_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p valign="top"><b>archive_read_disk_entry_from_file</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>, <i>int&nbsp;fd</i>,
<i>const&nbsp;struct&nbsp;stat&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_close</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:8%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:14%;"><b>archive_read_finish</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">These functions provide an API
for reading information about objects on disk. In
particular, they provide an interface for populating struct
archive_entry objects.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_new</b>()</p>

<p style="margin-left:20%;">Allocates and initializes a
struct archive object suitable for reading object
information from disk.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_symlink_logical</b>(),
<b>archive_read_disk_set_symlink_physical</b>(),
<b>archive_read_disk_set_symlink_hybrid</b>()</p>

<p style="margin-left:20%;">This sets the mode used for
handling symbolic links. The
&lsquo;&lsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &lsquo;&lsquo;physical&rsquo;&rsquo;
mode does not follow any symbolic links. The
&lsquo;&lsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &lsquo;&lsquo;logical&rsquo;&rsquo;
mode.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_gname</b>(),
<b>archive_read_disk_uname</b>()</p>

<p style="margin-left:20%;">Returns a user or group name
given a gid or uid value. By default, these always return a
NULL string.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_gname_lookup</b>(),
<b>archive_read_disk_set_uname_lookup</b>()</p>

<p style="margin-left:20%;">These allow you to override the
functions used for user and group name lookups. You may also
provide a void * pointer to a private data structure and a
cleanup function for that data. The cleanup function will be
invoked when the struct archive object is destroyed or when
new lookup functions are registered.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_standard_lookup</b>()</p>

<p style="margin-left:20%;">This convenience function
installs a standard set of user and group name lookup
functions. These functions use getpwid(3) and getgrid(3) to
convert ids to names, defaulting to NULL if the names cannot
be looked up. These functions also implement a simple memory
cache to reduce the number of calls to getpwid(3) and
getgrid(3).</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_disk_entry_from_file</b>()</p>

<p style="margin-left:20%;">Populates a struct
archive_entry object with information about a particular
file. The archive_entry object must have already been
created with archive_entry_new(3) and at least one of the
source path or path fields must already be set. (If both are
set, the source path will be used.)</p>

<p style="margin-left:20%; margin-top: 1em">Information is
read from disk using the path name from the struct
archive_entry object. If a file descriptor is provided, some
information will be obtained using that file descriptor, on
platforms that support the appropriate system calls.</p>

<p style="margin-left:20%; margin-top: 1em">If a pointer to
a struct stat is provided, information from that structure
will be used instead of reading from the disk where
appropriate. This can provide performance benefits in
scenarios where struct stat information has already been
read from the disk as a side effect of some other operation.
(For example, directory traversal libraries often provide
this information.)</p>

<p style="margin-left:20%; margin-top: 1em">Where
necessary, user and group ids are converted to user and
group names using the currently registered lookup functions
above. This affects the file ownership fields and ACL values
in the struct archive_entry object.</p>


<p style="margin-top: 1em" valign="top"><b>archive_read_close</b>()</p>

<p style="margin-left:20%;">This currently does
nothing.</p>


<p style="margin-top: 1em" valign="top"><b>archive_write_finish</b>()</p>

<p style="margin-left:20%;">Invokes
<b>archive_write_close</b>() if it was not invoked manually,
then releases all resources.</p>

<p style="margin-left:8%;">More information about the
<i>struct archive</i> object and the overall design of the
library can be found in the libarchive(3) overview.</p>

<p style="margin-top: 1em" valign="top"><b>EXAMPLE</b></p>

<p style="margin-left:8%;">The following illustrates basic
usage of the library by showing how to use it to copy an
item on disk into an archive.</p>

<p style="margin-left:17%; margin-top: 1em">void <br>
file_to_archive(struct archive *a, const char *name) <br>
{ <br>
char buff[8192]; <br>
size_t bytes_read; <br>
struct archive *ard; <br>
struct archive_entry *entry; <br>
int fd;</p>

<p style="margin-left:17%; margin-top: 1em">ard =
archive_read_disk_new(); <br>
archive_read_disk_set_standard_lookup(ard); <br>
entry = archive_entry_new(); <br>
fd = open(name, O_RDONLY); <br>
if (fd &lt; 0) <br>
return; <br>
archive_entry_copy_sourcepath(entry, name); <br>
archive_read_disk_entry_from_file(ard, entry, fd, NULL);
<br>
archive_write_header(a, entry); <br>
while ((bytes_read = read(fd, buff, sizeof(buff))) &gt; 0)
<br>
archive_write_data(a, buff, bytes_read); <br>
archive_write_finish_entry(a); <br>
archive_read_finish(ard); <br>
archive_entry_free(entry); <br>
}</p>

<p style="margin-top: 1em" valign="top"><b>RETURN
VALUES</b></p>

<p style="margin-left:8%;">Most functions return
<b>ARCHIVE_OK</b> (zero) on success, or one of several
negative error codes for errors. Specific error codes
include: <b>ARCHIVE_RETRY</b> for operations that might
succeed if retried, <b>ARCHIVE_WARN</b> for unusual
conditions that do not prevent further operations, and
<b>ARCHIVE_FATAL</b> for serious errors that make remaining
operations impossible. The archive_errno(3) and
archive_error_string(3) functions can be used to retrieve an
appropriate error code and a textual error message. (See
archive_util(3) for details.)</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_disk_new</b>()
returns a pointer to a newly-allocated struct archive object
or NULL if the allocation failed for any reason.</p>


<p style="margin-left:8%; margin-top: 1em"><b>archive_read_disk_gname</b>()
and <b>archive_read_disk_uname</b>() return const char *
pointers to the textual name or NULL if the lookup failed
for any reason. The returned pointer points to internal
storage that may be reused on the next call to either of
these functions; callers should copy the string if they need
to continue accessing it.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">archive_read(3),
archive_write(3), archive_write_disk(3), tar(1),
libarchive(3)</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3. The
<b>archive_read_disk</b> interface was added to
<b>libarchive 2.6</b> and first appeared in
FreeBSD&nbsp;8.0.</p>

<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p>

<p style="margin-left:8%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lang;kientzle@@freebsd.org&rang;.</p>

<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>

<p style="margin-left:8%;">The
&lsquo;&lsquo;standard&rsquo;&rsquo; user name and group
name lookup functions are not the defaults because
getgrid(3) and getpwid(3) are sometimes too large for
particular applications. The current design allows the
application author to use a more compact implementation when
appropriate.</p>

<p style="margin-left:8%; margin-top: 1em">The full list of
metadata read from disk by
<b>archive_read_disk_entry_from_file</b>() is necessarily
system-dependent.</p>

<p style="margin-left:8%; margin-top: 1em">The
<b>archive_read_disk_entry_from_file</b>() function reads as
much information as it can from disk. Some method should be
provided to limit this so that clients who do not need ACLs,
for instance, can avoid the extra work needed to look up
such information.</p>

<p style="margin-left:8%; margin-top: 1em">This API should
provide a set of methods for walking a directory tree. That
would make it a direct parallel of the archive_read(3) API.
When such methods are implemented, the
&lsquo;&lsquo;hybrid&rsquo;&rsquo; symbolic link mode will
make sense.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;9.0
March&nbsp;10, 2009 FreeBSD&nbsp;9.0</p>
<hr>
</body>
</html>
@


1.1.1.4
log
@Import libarchive-2.8.4:
- Improved reliability of hash function detection
- Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minix
@
text
@d1 341
a341 765
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Wed Jun 30 11:55:52 2010
%%DocumentNeededResources: font Times-Roman
%%DocumentSuppliedResources: procset grops 1.19 2
%%Pages: 53
%%PageOrder: Ascend
%%DocumentMedia: Default 612 792 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.19 2
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
}bind def
/PEND{
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Roman
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Roman@@0 ENC0/Times-Roman RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q
(March 10, 2009 archi)74.5 48 Q -.15(ve)-.25 G(_read_disk 3).15 E
(</title>)36 72 Q 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36
24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48
Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E
(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E
(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q
(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S
(ME).35 E(</h3>)36 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_read_disk_ne).15
E(w</b>,)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_disk_set_symlink_logical</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25
G(_read_disk_set_symlink_ph).15 E(ysical</b>,)-.05 E 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_set_symlink_h).15 E(ybrid</b>,)-.05 E(<b>archi)0 24 Q -.15
(ve)-.25 G(_read_disk_entry_from_\214le</b>,).15 E(<b>archi)0 36 Q -.15
(ve)-.25 G(_read_disk_gname</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G
(_read_disk_uname</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_disk_set_uname_lookup</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G
(_read_disk_set_gname_lookup</b>,).15 E 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_set_standard_lookup</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25
G(_read_close</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_\214nish</b>).15 E 2.5(-f)0 48 S
(unctions for reading objects from disk)-2.5 E(<h3 id="SYNOPSIS">)36 60
Q(SYNOPSIS)36 72 Q 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h3>)36 12 Q
(<br><br><code></code><code>struct</code><code> archi)0 24 Q -.15(ve)
-.25 G(</code><code> *</code>).15 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_disk_ne).15 E(w</b>\(<code></code><code>v)-.25 E(oid</code>\))-.2
E(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve)
-.25 G
(_read_disk_set_symlink_logical</b>\(<code></code><code>struct archi).15
E .3 -.15(ve *)-.25 H(</code>\)).15 E
(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_set_symlink_ph).15 E
(ysical</b>\(<code></code><code>struct archi)-.05 E .3 -.15(ve *)-.25 H
(</code>\)).15 E(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0
36 Q -.15(ve)-.25 G(_read_disk_set_symlink_h).15 E
(ybrid</b>\(<code></code><code>struct archi)-.05 E .3 -.15(ve *)-.25 H
(</code>\)).15 E(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0
60 Q -.15(ve)-.25 G
(_read_disk_gname</b>\(<code></code><code>struct archi).15 E .3 -.15
(ve *)-.25 H(</code><code>, gid_t</code>\)).15 E
(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_uname</b>\(<code></code><code>struct archi).15 E .3 -.15
(ve *)-.25 H(</code><code>, uid_t</code>\)).15 E
(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve)
-.25 G(_read_disk_set_gname_lookup</b>\(<code></code>).15 E
(<code></code><code>struct archi)0 48 Q .3 -.15(ve *)-.25 H(</code>).15
E(<code></code><code>v)0 60 Q(oid *</code>)-.2 E
(<code></code><code>const char *\(*lookup\)\(v)0 72 Q
(oid *, gid_t\)</code>)-.2 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<code></code><code>v)0 12 Q(oid \(*cleanup\)\(v)
-.2 E(oid *\)</code>)-.2 E(\))0 24 Q
(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q -.15(ve)
-.25 G(_read_disk_set_uname_lookup</b>\(<code></code>).15 E
(<code></code><code>struct archi)0 60 Q .3 -.15(ve *)-.25 H(</code>).15
E(<code></code><code>v)0 72 Q(oid *</code>)-.2 E 0 Cg EP
%%Page: 11 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<code></code><code>const char *\(*lookup\)\(v)0
12 Q(oid *, uid_t\)</code>)-.2 E(<code></code><code>v)0 24 Q
(oid \(*cleanup\)\(v)-.2 E(oid *\)</code>)-.2 E(\))0 36 Q
(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve)
-.25 G
(_read_disk_set_standard_lookup</b>\(<code></code><code>struct archi).15
E .3 -.15(ve *)-.25 H(</code>\)).15 E
(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_entry_from_\214le</b>\(<code></code>).15 E
(<code></code><code>struct archi)0 24 Q .3 -.15(ve *)-.25 H(</code>).15
E(<code></code><code>struct archi)0 36 Q -.15(ve)-.25 G(_entry *</code>)
.15 E(<code></code><code>int fd</code>)0 48 Q
(<code></code><code>const struct stat *</code>)0 60 Q(\))0 72 Q 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<br><br><code></code><code>int</code>)0 12 Q
(<b>archi)0 24 Q -.15(ve)-.25 G
(_read_close</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *)
-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 36 Q
(<b>archi)0 48 Q -.15(ve)-.25 G
(_read_\214nish</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *)
-.25 H(</code>\)).15 E(<h3 id="DESCRIPTION">)36 60 Q(DESCRIPTION)36 72 Q
0 Cg EP
%%Page: 14 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h3>)36 12 Q(These functions pro)0 24 Q
(vide an API for reading information about)-.15 E(objects on disk.)0 36
Q(In particular)0 48 Q 2.5(,t)-.4 G(he)-2.5 E 2.5(yp)-.15 G(ro)-2.5 E
(vide an interf)-.15 E(ace for populating)-.1 E(<font size="-1"></font>\
<font size="-1">struct</font><font size="-1"> archi)0 60 Q -.15(ve)-.25
G(_entry</font>).15 E(objects.)0 72 Q 0 Cg EP
%%Page: 15 15
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dl compact>)0 12 Q(<p><dt><b>archi)0 24 Q -.15
(ve)-.25 G(_read_disk_ne).15 E(w</b>\(<code></code>\)<dd>)-.25 E
(Allocates and initializes a)0 36 Q(<font size="-1"></font><font size="\
-1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G(</font>)
.15 E(object suitable for reading object information from disk.)0 60 Q
(<p><dt>Xo<dd>)0 72 Q 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G
(_read_disk_set_symlink_logical</b>\(<code></code>\),).15 E(<b>archi)0
24 Q -.15(ve)-.25 G(_read_disk_set_symlink_ph).15 E
(ysical</b>\(<code></code>\),)-.05 E(<b>archi)0 36 Q -.15(ve)-.25 G
(_read_disk_set_symlink_h).15 E(ybrid</b>\(<code></code>\))-.05 E
(This sets the mode used for handling symbolic links.)0 48 Q(The)0 60 Q
-.74(``)0 72 S(logical').74 E(')-.74 E 0 Cg EP
%%Page: 17 17
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(mode follo)0 12 Q(ws all symbolic links.)-.25 E
(The)0 24 Q -.74(``)0 36 S(ph).74 E(ysical')-.05 E(')-.74 E
(mode does not follo)0 48 Q 2.5(wa)-.25 G .3 -.15(ny s)-2.5 H
(ymbolic links.).15 E(The)0 60 Q -.74(``)0 72 S -.05(hy).74 G(brid').05
E(')-.74 E 0 Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(mode currently beha)0 12 Q -.15(ve)-.2 G 2.5(si)
.15 G(dentically to the)-2.5 E -.74(``)0 24 S(logical').74 E(')-.74 E
(mode.)0 36 Q(<p><dt>Xo<dd>)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 G
(_read_disk_gname</b>\(<code></code>\),).15 E(<b>archi)0 72 Q -.15(ve)
-.25 G(_read_disk_uname</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Returns a user or group name gi)0 12 Q -.15(ve)
-.25 G 2.5(nag).15 G(id or uid v)-2.5 E(alue.)-.25 E(By def)0 24 Q
(ault, these al)-.1 E -.1(wa)-.1 G(ys return a NULL string.).1 E
(<p><dt>Xo<dd>)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G
(_read_disk_set_gname_lookup</b>\(<code></code>\),).15 E(<b>archi)0 60 Q
-.15(ve)-.25 G(_read_disk_set_uname_lookup</b>\(<code></code>\)).15 E
(These allo)0 72 Q 2.5(wy)-.25 G(ou to o)-2.5 E -.15(ve)-.15 G
(rride the functions used for).15 E 0 Cg EP
%%Page: 20 20
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(user and group name lookups.)0 12 Q -1.1(Yo)0 24
S 2.5(um)1.1 G(ay also pro)-2.5 E(vide a)-.15 E
(<font size="-1"></font><font size="-1">v)0 36 Q
(oid</font><font size="-1"> *</font>)-.2 E(pointer to a pri)0 48 Q -.25
(va)-.25 G(te data structure and a cleanup function for).25 E
(that data.)0 60 Q(The cleanup function will be in)0 72 Q -.2(vo)-.4 G
-.1(ke).2 G 2.5(dw).1 G(hen the)-2.5 E 0 Cg EP
%%Page: 21 21
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<font size="-1"></font><font size="-1">struct</\
font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(</font>).15 E
(object is destro)0 24 Q(yed or when ne)-.1 E 2.5(wl)-.25 G
(ookup functions are re)-2.5 E(gistered.)-.15 E(<p><dt><b>archi)0 36 Q
-.15(ve)-.25 G(_read_disk_set_standard_lookup</b>\(<code></code>\)<dd>)
.15 E(This con)0 48 Q -.15(ve)-.4 G
(nience function installs a standard set of user).15 E
(and group name lookup functions.)0 60 Q(These functions use)0 72 Q 0 Cg
EP
%%Page: 22 22
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(<a href="../html3/getpwid.html">getpwid\(3\)</a>)0 12 Q(and)0 24 Q
(<a href="../html3/getgrid.html">getgrid\(3\)</a>)0 36 Q(to con)0 48 Q
-.15(ve)-.4 G(rt ids to names, def).15 E
(aulting to NULL if the names cannot)-.1 E(be look)0 60 Q(ed up.)-.1 E
(These functions also implement a simple memory cache to reduce)0 72 Q 0
Cg EP
%%Page: 23 23
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(the number of calls to)0 12 Q
(<a href="../html3/getpwid.html">getpwid\(3\)</a>)0 24 Q(and)0 36 Q
(<a href="../html3/getgrid.html">getgrid\(3\)</a>.)0 48 Q
(<p><dt><b>archi)0 60 Q -.15(ve)-.25 G
(_read_disk_entry_from_\214le</b>\(<code></code>\)<dd>).15 E
(Populates a)0 72 Q 0 Cg EP
%%Page: 24 24
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<font size="-1"></font><font size="-1">struct</\
font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(_entry</font>).15 E
(object with information about a particular \214le.)0 24 Q(The)0 36 Q
(<font size="-1"></font><font size="-1">archi)0 48 Q -.15(ve)-.25 G
(_entry</font>).15 E(object must ha)0 60 Q .3 -.15(ve a)-.2 H
(lready been created with).15 E(<a href="../html3/archi)0 72 Q -.15(ve)
-.25 G(_entry_ne).15 E -.65(w.)-.25 G(html">archi).65 E -.15(ve)-.25 G
(_entry_ne).15 E(w\(3\)</a>)-.25 E 0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and at least one of the source path or path \
\214elds must already be set.)0 12 Q
(\(If both are set, the source path will be used.\))0 24 Q(<p>)36 36 Q
(Information is read from disk using the path name from the)0 48 Q(<fon\
t size="-1"></font><font size="-1">struct</font><font size="-1"> archi)0
60 Q -.15(ve)-.25 G(_entry</font>).15 E(object.)0 72 Q 0 Cg EP
%%Page: 26 26
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(If a \214le descriptor is pro)0 12 Q
(vided, some information will be obtained using)-.15 E
(that \214le descriptor)0 24 Q 2.5(,o)-.4 G 2.5(np)-2.5 G
(latforms that support the appropriate)-2.5 E(system calls.)0 36 Q(<p>)
36 48 Q(If a pointer to a)0 60 Q(<font size="-1"></font><font size="-1"\
>struct</font><font size="-1"> stat</font>)0 72 Q 0 Cg EP
%%Page: 27 27
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(is pro)0 12 Q
(vided, information from that structure will be used instead)-.15 E
(of reading from the disk where appropriate.)0 24 Q(This can pro)0 36 Q
(vide performance bene\214ts in scenarios where)-.15 E(<font size="-1">\
</font><font size="-1">struct</font><font size="-1"> stat</font>)0 48 Q
(information has already been read from the disk as a side ef)0 60 Q
(fect)-.25 E(of some other operation.)0 72 Q 0 Cg EP
%%Page: 28 28
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(F)0 12 Q(or e)-.15 E(xample, directory tra)
-.15 E -.15(ve)-.2 G(rsal libraries often pro).15 E
(vide this information.\))-.15 E(<p>)36 24 Q(Where necessary)0 36 Q 2.5
(,u)-.65 G(ser and group ids are con)-2.5 E -.15(ve)-.4 G
(rted to user and group names).15 E(using the currently re)0 48 Q
(gistered lookup functions abo)-.15 E -.15(ve)-.15 G(.).15 E(This af)0
60 Q(fects the \214le o)-.25 E(wnership \214elds and A)-.25 E(CL v)-.4 E
(alues in the)-.25 E(<font size="-1"></font><font size="-1">struct</fon\
t><font size="-1"> archi)0 72 Q -.15(ve)-.25 G(_entry</font>).15 E 0 Cg
EP
%%Page: 29 29
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(object.)0 12 Q(<p><dt><b>archi)0 24 Q -.15(ve)
-.25 G(_read_close</b>\(<code></code>\)<dd>).15 E
(This currently does nothing.)0 36 Q(<p><dt><b>archi)0 48 Q -.15(ve)-.25
G(_write_\214nish</b>\(<code></code>\)<dd>).15 E(In)0 60 Q -.2(vo)-.4 G
-.1(ke).2 G(s).1 E(<b>archi)0 72 Q -.15(ve)-.25 G
(_write_close</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 30 30
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(if it w)0 12 Q(as not in)-.1 E -.2(vo)-.4 G -.1
(ke).2 G 2.5(dm).1 G(anually)-2.5 E 2.5(,t)-.65 G
(hen releases all resources.)-2.5 E(</dl>)0 24 Q
(More information about the)0 36 Q(<i></i><i>struct</i><i> archi)0 48 Q
-.15(ve)-.25 G(</i>).15 E(object and the o)0 60 Q -.15(ve)-.15 G
(rall design of the library can be found in the).15 E
(<a href="../html3/libarchi)0 72 Q -.15(ve)-.25 G(.html">libarchi).15 E
-.15(ve)-.25 G(\(3\)</a>).15 E 0 Cg EP
%%Page: 31 31
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.15(ove)0 12 S(rvie).15 E -.65(w.)-.25 G
(<h3 id="EXAMPLE">)36 24 Q(EXAMPLE)36 36 Q(</h3>)36 48 Q(The follo)0 60
Q(wing illustrates basic usage of the library by)-.25 E(sho)0 72 Q
(wing ho)-.25 E 2.5(wt)-.25 G 2.5(ou)-2.5 G(se it to cop)-2.5 E 2.5(ya)
-.1 G 2.5(ni)-2.5 G(tem on disk into an archi)-2.5 E -.15(ve)-.25 G(.)
.15 E 0 Cg EP
%%Page: 32 32
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dl compact><dt><dd>)0 12 Q(<code>)0 24 Q(<pre>)
0 36 Q -.2(vo)0 48 S(id).2 E(\214le_to_archi)0 60 Q -.15(ve)-.25 G
(\(struct archi).15 E .3 -.15(ve *)-.25 H(a, const char *name\)).15 E({)
0 72 Q 0 Cg EP
%%Page: 33 33
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char b)5 12 Q(uf)-.2 E(f[8192];)-.25 E
(size_t bytes_read;)5 24 Q(struct archi)5 36 Q .3 -.15(ve *)-.25 H(ard;)
.15 E(struct archi)5 48 Q -.15(ve)-.25 G(_entry *entry;).15 E(int fd;)5
60 Q(<p>)36 72 Q 0 Cg EP
%%Page: 34 34
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(ard = archi)5 12 Q -.15(ve)-.25 G(_read_disk_ne)
.15 E(w\(\);)-.25 E(archi)5 24 Q -.15(ve)-.25 G
(_read_disk_set_standard_lookup\(ard\);).15 E(entry = archi)5 36 Q -.15
(ve)-.25 G(_entry_ne).15 E(w\(\);)-.25 E(fd = open\(name, O_RDONL)5 48 Q
(Y\);)-1 E(if \(fd < 0\))5 60 Q(return;)12.5 72 Q 0 Cg EP
%%Page: 35 35
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(archi)5 12 Q -.15(ve)-.25 G(_entry_cop).15 E
(y_sourcepath\(entry)-.1 E 2.5(,n)-.65 G(ame\);)-2.5 E(archi)5 24 Q -.15
(ve)-.25 G(_read_disk_entry_from_\214le\(ard, entry).15 E 2.5(,f)-.65 G
(d, NULL\);)-2.5 E(archi)5 36 Q -.15(ve)-.25 G
(_write_header\(a, entry\);).15 E(while \(\(bytes_read = read\(fd, b)5
48 Q(uf)-.2 E(f, sizeof\(b)-.25 E(uf)-.2 E(f\)\)\) > 0\))-.25 E(archi)10
60 Q -.15(ve)-.25 G(_write_data\(a, b).15 E(uf)-.2 E(f, bytes_read\);)
-.25 E(archi)5 72 Q -.15(ve)-.25 G(_write_\214nish_entry\(a\);).15 E 0
Cg EP
%%Page: 36 36
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(archi)5 12 Q -.15(ve)-.25 G
(_read_\214nish\(ard\);).15 E(archi)5 24 Q -.15(ve)-.25 G
(_entry_free\(entry\);).15 E(})0 36 Q(</pre>)0 48 Q(</code>)0 60 Q
(</dl>)0 72 Q 0 Cg EP
%%Page: 37 37
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="RETURN V)36 12 Q(ALUES">)-1.35 E
(RETURN V)36 24 Q(ALUES)-1.35 E(</h3>)36 36 Q(Most functions return)0 48
Q(<b></b><b>ARCHIVE_OK</b>)0 60 Q(\(zero\) on success, or one of se)0 72
Q -.15(ve)-.25 G(ral ne).15 E -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G 0
Cg EP
%%Page: 38 38
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(error codes for errors.)0 12 Q
(Speci\214c error codes include:)0 24 Q(<b></b><b>ARCHIVE_RETR)0 36 Q
(Y</b>)-.65 E(for operations that might succeed if retried,)0 48 Q
(<b></b><b>ARCHIVE_W)0 60 Q(ARN</b>)-1.2 E
(for unusual conditions that do not pre)0 72 Q -.15(ve)-.25 G
(nt further operations, and).15 E 0 Cg EP
%%Page: 39 39
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>ARCHIVE_F)0 12 Q -1.21 -1.11(AT A)-.74
H(L</b>)1.11 E(for serious errors that mak)0 24 Q 2.5(er)-.1 G
(emaining operations impossible.)-2.5 E(The)0 36 Q
(<a href="../html3/archi)0 48 Q -.15(ve)-.25 G(_errno.html">archi).15 E
-.15(ve)-.25 G(_errno\(3\)</a>).15 E(and)0 60 Q(<a href="../html3/archi)
0 72 Q -.15(ve)-.25 G(_error_string.html">archi).15 E -.15(ve)-.25 G
(_error_string\(3\)</a>).15 E 0 Cg EP
%%Page: 40 40
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(functions can be used to retrie)0 12 Q .3 -.15
(ve a)-.25 H 2.5(na).15 G(ppropriate error code and a)-2.5 E(te)0 24 Q
(xtual error message.)-.15 E(\(See)0 36 Q(<a href="../html3/archi)0 48 Q
-.15(ve)-.25 G(_util.html">archi).15 E -.15(ve)-.25 G(_util\(3\)</a>).15
E(for details.\))0 60 Q(<p>)36 72 Q 0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_read_disk_ne).15
E(w</b>\(<code></code>\))-.25 E(returns a pointer to a ne)0 24 Q
(wly-allocated)-.25 E(<font size="-1"></font><font size="-1">struct</fo\
nt><font size="-1"> archi)0 36 Q -.15(ve)-.25 G(</font>).15 E
(object or NULL if the allocation f)0 48 Q(ailed for an)-.1 E 2.5(yr)
-.15 G(eason.)-2.5 E(<p>)36 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G
(_read_disk_gname</b>\(<code></code>\)).15 E 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_read_disk_uname</b>\(<code></code>\)).15 E(return)0 36 Q(<font size="\
-1"></font><font size="-1">const</font><font size="-1"> char</font><fon\
t size="-1"> *</font>)0 48 Q(pointers to the te)0 60 Q
(xtual name or NULL if the lookup f)-.15 E(ailed for an)-.1 E 2.5(yr)
-.15 G(eason.)-2.5 E
(The returned pointer points to internal storage that)0 72 Q 0 Cg EP
%%Page: 43 43
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(may be reused on the ne)0 12 Q
(xt call to either of these functions;)-.15 E(callers should cop)0 24 Q
2.5(yt)-.1 G(he string if the)-2.5 E 2.5(yn)-.15 G
(eed to continue accessing it.)-2.5 E(<p>)36 36 Q(<h3 id="SEE ALSO">)36
48 Q(SEE ALSO)36 60 Q(</h3>)36 72 Q 0 Cg EP
%%Page: 44 44
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<a href="../html3/archi)0 12 Q -.15(ve)-.25 G
(_read.html">archi).15 E -.15(ve)-.25 G(_read\(3\)</a>,).15 E
(<a href="../html3/archi)0 24 Q -.15(ve)-.25 G(_write.html">archi).15 E
-.15(ve)-.25 G(_write\(3\)</a>,).15 E(<a href="../html3/archi)0 36 Q
-.15(ve)-.25 G(_write_disk.html">archi).15 E -.15(ve)-.25 G
(_write_disk\(3\)</a>,).15 E(<a href="../html1/tar)0 48 Q
(.html">tar\(1\)</a>,)-.55 E(<a href="../html3/libarchi)0 60 Q -.15(ve)
-.25 G(.html">libarchi).15 E -.15(ve)-.25 G(\(3\)</a>).15 E
(<h3 id="HIST)36 72 Q(OR)-.18 E(Y">)-.65 E 0 Cg EP
%%Page: 45 45
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(HIST)36 12 Q(OR)-.18 E(Y)-.65 E(</h3>)36 24 Q
(The)0 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b>).15 E
(library \214rst appeared in)0 60 Q(FreeBSD5.3.)0 72 Q 0 Cg EP
%%Page: 46 46
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G
(_read_disk</b>).15 E(interf)0 36 Q(ace w)-.1 E(as added to)-.1 E
(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b><b>2.6</b>).15 E
(and \214rst appeared in)0 60 Q(FreeBSD8.0.)0 72 Q 0 Cg EP
%%Page: 47 47
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="A)36 12 Q(UTHORS">)-.55 E -.55(AU)36 24
S(THORS).55 E(</h3>)36 36 Q(<p>)36 48 Q(The)0 60 Q(<b>libarchi)0 72 Q
-.15(ve)-.25 G(</b>).15 E 0 Cg EP
%%Page: 48 48
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(library w)0 12 Q(as written by)-.1 E -.35(Ti)0
24 S 2.5(mK).35 G(ientzle &lt;kientzle@@freebsd.or)-2.5 E(g&gt;.)-.18 E
(<h3 id="B)36 36 Q(UGS">)-.1 E -.1(BU)36 48 S(GS).1 E(</h3>)36 60 Q(The)
0 72 Q 0 Cg EP
%%Page: 49 49
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(standard').74 E(')-.74 E
(user name and group name lookup functions are not the def)0 24 Q
(aults because)-.1 E(<a href="../html3/getgrid.html">getgrid\(3\)</a>)0
36 Q(and)0 48 Q(<a href="../html3/getpwid.html">getpwid\(3\)</a>)0 60 Q
(are sometimes too lar)0 72 Q(ge for particular applications.)-.18 E 0
Cg EP
%%Page: 50 50
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The current design allo)0 12 Q
(ws the application author to use a more)-.25 E
(compact implementation when appropriate.)0 24 Q(<p>)36 36 Q
(The full list of metadata read from disk by)0 48 Q(<b>archi)0 60 Q -.15
(ve)-.25 G(_read_disk_entry_from_\214le</b>\(<code></code>\)).15 E
(is necessarily system-dependent.)0 72 Q 0 Cg EP
%%Page: 51 51
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(The)0 24 Q(<b>archi)0 36 Q -.15(ve)
-.25 G(_read_disk_entry_from_\214le</b>\(<code></code>\)).15 E
(function reads as much information as it can from disk.)0 48 Q
(Some method should be pro)0 60 Q
(vided to limit this so that clients who)-.15 E(do not need A)0 72 Q
(CLs, for instance, can a)-.4 E -.2(vo)-.2 G(id the e).2 E(xtra w)-.15 E
(ork needed)-.1 E 0 Cg EP
%%Page: 52 52
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(to look up such information.)0 12 Q(<p>)36 24 Q
(This API should pro)0 36 Q(vide a set of methods for w)-.15 E
(alking a directory tree.)-.1 E(That w)0 48 Q(ould mak)-.1 E 2.5(ei)-.1
G 2.5(tad)-2.5 G(irect parallel of the)-2.5 E(<a href="../html3/archi)0
60 Q -.15(ve)-.25 G(_read.html">archi).15 E -.15(ve)-.25 G
(_read\(3\)</a>).15 E(API.)0 72 Q 0 Cg EP
%%Page: 53 53
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(When such methods are implemented, the)0 12 Q
-.74(``)0 24 S -.05(hy).74 G(brid').05 E(')-.74 E
(symbolic link mode will mak)0 36 Q 2.5(es)-.1 G(ense.)-2.5 E(</body>)0
48 Q(</html>)0 60 Q 0 Cg EP
%%Trailer
end
%%EOF
@


1.1.1.5
log
@Import libarchive-3.2.1:
- security fixes and other bugfixes
- support for multhreading in xz 5.2+
@
text
@d1 765
a765 356
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p>ARCHIVE_READ_DISK(3) BSD Library Functions Manual
ARCHIVE_READ_DISK(3)</p>

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:6%;"><b>archive_read_disk_new</b>,
<b>archive_read_disk_set_symlink_logical</b>,
<b>archive_read_disk_set_symlink_physical</b>,
<b>archive_read_disk_set_symlink_hybrid</b>,
<b>archive_read_disk_entry_from_file</b>,
<b>archive_read_disk_gname</b>,
<b>archive_read_disk_uname</b>,
<b>archive_read_disk_set_uname_lookup</b>,
<b>archive_read_disk_set_gname_lookup</b>,
<b>archive_read_disk_set_standard_lookup</b>,
<b>archive_read_close</b>, <b>archive_read_finish</b>,
<b>archive_read_free</b> &mdash; functions for reading
objects from disk</p>

<p style="margin-top: 1em"><b>LIBRARY</b></p>

<p style="margin-left:6%;">Streaming Archive Library
(libarchive, -larchive)</p>

<p style="margin-top: 1em"><b>SYNOPSIS</b></p>

<p style="margin-left:6%;"><b>#include
&lt;archive.h&gt;</b></p>

<p style="margin-left:6%; margin-top: 1em"><i>struct
archive *</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_new</b>(<i>void</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_logical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_physical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_gname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>gid_t</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_uname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>uid_t</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_set_gname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*(*lookup)(void&nbsp;*,&nbsp;gid_t)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_set_uname_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*(*lookup)(void&nbsp;*,&nbsp;uid_t)</i>,
<i>void&nbsp;(*cleanup)(void&nbsp;*)</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_set_standard_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_entry_from_file</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive_entry&nbsp;*</i>, <i>int&nbsp;fd</i>,
<i>const&nbsp;struct&nbsp;stat&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_close</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_finish</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_free</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-top: 1em"><b>DESCRIPTION</b></p>

<p style="margin-left:6%;">These functions provide an API
for reading information about objects on disk. In
particular, they provide an interface for populating struct
archive_entry objects.</p>


<p style="margin-top: 1em"><b>archive_read_disk_new</b>()</p>

<p style="margin-left:17%;">Allocates and initializes a
struct archive object suitable for reading object
information from disk.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_symlink_logical</b>(),
<b>archive_read_disk_set_symlink_physical</b>(),
<b>archive_read_disk_set_symlink_hybrid</b>()</p>

<p style="margin-left:17%;">This sets the mode used for
handling symbolic links. The
&rsquo;&rsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &rsquo;&rsquo;physical&rsquo;&rsquo;
mode does not follow any symbolic links. The
&rsquo;&rsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &rsquo;&rsquo;logical&rsquo;&rsquo;
mode.</p>


<p style="margin-top: 1em"><b>archive_read_disk_gname</b>(),
<b>archive_read_disk_uname</b>()</p>

<p style="margin-left:17%;">Returns a user or group name
given a gid or uid value. By default, these always return a
NULL string.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_gname_lookup</b>(),
<b>archive_read_disk_set_uname_lookup</b>()</p>

<p style="margin-left:17%;">These allow you to override the
functions used for user and group name lookups. You may also
provide a void * pointer to a private data structure and a
cleanup function for that data. The cleanup function will be
invoked when the struct archive object is destroyed or when
new lookup functions are registered.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_standard_lookup</b>()</p>

<p style="margin-left:17%;">This convenience function
installs a standard set of user and group name lookup
functions. These functions use getpwuid(3) and getgrgid(3)
to convert ids to names, defaulting to NULL if the names
cannot be looked up. These functions also implement a simple
memory cache to reduce the number of calls to getpwuid(3)
and getgrgid(3).</p>


<p style="margin-top: 1em"><b>archive_read_disk_entry_from_file</b>()</p>

<p style="margin-left:17%;">Populates a struct
archive_entry object with information about a particular
file. The archive_entry object must have already been
created with archive_entry_new(3) and at least one of the
source path or path fields must already be set. (If both are
set, the source path will be used.)</p>

<p style="margin-left:17%; margin-top: 1em">Information is
read from disk using the path name from the struct
archive_entry object. If a file descriptor is provided, some
information will be obtained using that file descriptor, on
platforms that support the appropriate system calls.</p>

<p style="margin-left:17%; margin-top: 1em">If a pointer to
a struct stat is provided, information from that structure
will be used instead of reading from the disk where
appropriate. This can provide performance benefits in
scenarios where struct stat information has already been
read from the disk as a side effect of some other operation.
(For example, directory traversal libraries often provide
this information.)</p>

<p style="margin-left:17%; margin-top: 1em">Where
necessary, user and group ids are converted to user and
group names using the currently registered lookup functions
above. This affects the file ownership fields and ACL values
in the struct archive_entry object.</p>

<p style="margin-top: 1em"><b>archive_read_close</b>()</p>

<p style="margin-left:17%;">Does nothing for
archive_read_disk handles.</p>


<p style="margin-top: 1em"><b>archive_read_finish</b>()</p>

<p style="margin-left:17%;">This is a deprecated synonym
for <b>archive_read_free</b>().</p>

<p style="margin-top: 1em"><b>archive_read_free</b>()</p>

<p style="margin-left:17%;">Invokes
<b>archive_read_close</b>() if it was not invoked manually,
then releases all resources.</p>

<p style="margin-left:6%;">More information about the
<i>struct archive</i> object and the overall design of the
library can be found in the libarchive(3) overview.</p>

<p style="margin-top: 1em"><b>EXAMPLE</b></p>

<p style="margin-left:6%;">The following illustrates basic
usage of the library by showing how to use it to copy an
item on disk into an archive.</p>

<p style="margin-left:14%; margin-top: 1em">void <br>
file_to_archive(struct archive *a, const char *name) <br>
{ <br>
char buff[8192]; <br>
size_t bytes_read; <br>
struct archive *ard; <br>
struct archive_entry *entry; <br>
int fd;</p>

<p style="margin-left:14%; margin-top: 1em">ard =
archive_read_disk_new(); <br>
archive_read_disk_set_standard_lookup(ard); <br>
entry = archive_entry_new(); <br>
fd = open(name, O_RDONLY); <br>
if (fd &lt; 0) <br>
return; <br>
archive_entry_copy_pathname(entry, name); <br>
archive_read_disk_entry_from_file(ard, entry, fd, NULL);
<br>
archive_write_header(a, entry); <br>
while ((bytes_read = read(fd, buff, sizeof(buff))) &gt; 0)
<br>
archive_write_data(a, buff, bytes_read); <br>
archive_write_finish_entry(a); <br>
archive_read_free(ard); <br>
archive_entry_free(entry); <br>
}</p>

<p style="margin-top: 1em"><b>RETURN VALUES</b></p>

<p style="margin-left:6%;">Most functions return
<b>ARCHIVE_OK</b> (zero) on success, or one of several
negative error codes for errors. Specific error codes
include: <b>ARCHIVE_RETRY</b> for operations that might
succeed if retried, <b>ARCHIVE_WARN</b> for unusual
conditions that do not prevent further operations, and
<b>ARCHIVE_FATAL</b> for serious errors that make remaining
operations impossible.</p>


<p style="margin-left:6%; margin-top: 1em"><b>archive_read_disk_new</b>()
returns a pointer to a newly-allocated struct archive object
or NULL if the allocation failed for any reason.</p>


<p style="margin-left:6%; margin-top: 1em"><b>archive_read_disk_gname</b>()
and <b>archive_read_disk_uname</b>() return const char *
pointers to the textual name or NULL if the lookup failed
for any reason. The returned pointer points to internal
storage that may be reused on the next call to either of
these functions; callers should copy the string if they need
to continue accessing it.</p>

<p style="margin-top: 1em"><b>ERRORS</b></p>

<p style="margin-left:6%;">Detailed error codes and textual
descriptions are available from the <b>archive_errno</b>()
and <b>archive_error_string</b>() functions.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:6%;">archive_read(3),
archive_util(3), archive_write(3), archive_write_disk(3),
tar(1), libarchive(3)</p>

<p style="margin-top: 1em"><b>HISTORY</b></p>

<p style="margin-left:6%;">The <b>libarchive</b> library
first appeared in FreeBSD&nbsp;5.3. The
<b>archive_read_disk</b> interface was added to
<b>libarchive 2.6</b> and first appeared in
FreeBSD&nbsp;8.0.</p>

<p style="margin-top: 1em"><b>AUTHORS</b></p>

<p style="margin-left:6%;">The <b>libarchive</b> library
was written by Tim Kientzle
&lt;kientzle@@FreeBSD.org&gt;.</p>

<p style="margin-top: 1em"><b>BUGS</b></p>

<p style="margin-left:6%;">The
&rsquo;&rsquo;standard&rsquo;&rsquo; user name and group
name lookup functions are not the defaults because
getgrgid(3) and getpwuid(3) are sometimes too large for
particular applications. The current design allows the
application author to use a more compact implementation when
appropriate.</p>

<p style="margin-left:6%; margin-top: 1em">The full list of
metadata read from disk by
<b>archive_read_disk_entry_from_file</b>() is necessarily
system-dependent.</p>

<p style="margin-left:6%; margin-top: 1em">The
<b>archive_read_disk_entry_from_file</b>() function reads as
much information as it can from disk. Some method should be
provided to limit this so that clients who do not need ACLs,
for instance, can avoid the extra work needed to look up
such information.</p>

<p style="margin-left:6%; margin-top: 1em">This API should
provide a set of methods for walking a directory tree. That
would make it a direct parallel of the archive_read(3) API.
When such methods are implemented, the
&rsquo;&rsquo;hybrid&rsquo;&rsquo; symbolic link mode will
make sense.</p>

<p style="margin-left:6%; margin-top: 1em">BSD
February&nbsp;2, 2012 BSD</p>
<hr>
</body>
</html>
@


1.1.1.6
log
@Import libarchive-3.3.1.
@
text
@d2 1
a2 1
<!-- CreationDate: Sat Feb 25 11:22:03 2017 -->
d73 1
a73 2
<p style="margin-left:6%; margin-top: 1em"><i>const char
*</i></p>
d79 1
a79 2
<p style="margin-left:6%; margin-top: 1em"><i>const char
*</i></p>
d149 2
a150 2
&lsquo;&lsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &lsquo;&lsquo;physical&rsquo;&rsquo;
d152 2
a153 2
&lsquo;&lsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &lsquo;&lsquo;logical&rsquo;&rsquo;
d326 1
a326 1
&lsquo;&lsquo;standard&rsquo;&rsquo; user name and group
d349 1
a349 1
&lsquo;&lsquo;hybrid&rsquo;&rsquo; symbolic link mode will
d353 1
a353 1
December&nbsp;30, 2016 BSD</p>
@


1.1.1.7
log
@Import libarchive-3.3.2 + 9de5f3 + f9dacbf:
- Support NFS4 ACLs on Linux
- Bugfixes
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
a28 1
<b>archive_read_disk_set_behavior</b>,
d37 4
a40 2
<b>archive_read_disk_set_standard_lookup</b> &mdash;
functions for reading objects from disk</p>
a60 6
<p style="margin-left:12%;"><b>archive_read_disk_set_behavior</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


d115 15
a144 51
<p style="margin-top: 1em"><b>archive_read_disk_set_behavior</b>()</p>

<p style="margin-left:17%;">Configures various behavior
options when reading entries from disk. The flags field
consists of a bitwise OR of one or more of the following
values:</p>

<p><b>ARCHIVE_READDISK_HONOR_NODUMP</b></p>

<p style="margin-left:27%;">Skip files and directories with
the nodump file attribute (file flag) set. By default, the
nodump file atrribute is ignored.</p>

<p><b>ARCHIVE_READDISK_MAC_COPYFILE</b></p>

<p style="margin-left:27%;">Mac OS X specific. Read
metadata (ACLs and extended attributes) with copyfile(3). By
default, metadata is read using copyfile(3).</p>

<p><b>ARCHIVE_READDISK_NO_ACL</b></p>

<p style="margin-left:27%;">Do not read Access Control
Lists. By default, ACLs are read from disk.</p>

<p><b>ARCHIVE_READDISK_NO_FFLAGS</b></p>

<p style="margin-left:27%;">Do not read file attributes
(file flags). By default, file attributes are read from
disk. See chattr(1) (Linux) or chflags(1) (FreeBSD, Mac OS
X) for more information on file attributes.</p>

<p><b>ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS</b></p>

<p style="margin-left:27%;">Do not traverse mount points.
By defaut, moint points are traversed.</p>

<p><b>ARCHIVE_READDISK_NO_XATTR</b></p>

<p style="margin-left:27%;">Do not read extended file
attributes (xattrs). By default, extended file attributes
are read from disk. See xattr(7) (Linux), xattr(2) (Mac OS
X), or getextattr(8) (FreeBSD) for more information on
extended file attributes.</p>

<p><b>ARCHIVE_READDISK_RESTORE_ATIME</b></p>

<p style="margin-left:27%;">Restore access time of
traversed files. By default, access time of traversed files
is not restored.</p>


d151 2
a152 2
&rsquo;&rsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &rsquo;&rsquo;physical&rsquo;&rsquo;
d154 2
a155 2
&rsquo;&rsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &rsquo;&rsquo;logical&rsquo;&rsquo;
d219 17
d328 1
a328 1
&rsquo;&rsquo;standard&rsquo;&rsquo; user name and group
d351 1
a351 1
&rsquo;&rsquo;hybrid&rsquo;&rsquo; symbolic link mode will
d355 1
a355 1
April&nbsp;3, 2017 BSD</p>
@


1.1.1.8
log
@Import libarchive-3.3.3 as should have done originally.
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Sep  3 22:55:07 2018 -->
@


1.1.1.9
log
@Import libarchive 3.4.0
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
d191 7
a197 5
handling symbolic links. The &ldquo;logical&rdquo; mode
follows all symbolic links. The &ldquo;physical&rdquo; mode
does not follow any symbolic links. The &ldquo;hybrid&rdquo;
mode currently behaves identically to the
&ldquo;logical&rdquo; mode.</p>
d351 5
a355 4
<p style="margin-left:6%;">The &ldquo;standard&rdquo; user
name and group name lookup functions are not the defaults
because getgrgid(3) and getpwuid(3) are sometimes too large
for particular applications. The current design allows the
d374 3
a376 2
When such methods are implemented, the &ldquo;hybrid&rdquo;
symbolic link mode will make sense.</p>
@


1.1.1.10
log
@Import libarchive 3.7.2
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
a28 2
<b>archive_read_disk_open</b>,
<b>archive_read_disk_open_w</b>,
d38 2
a39 9
<b>archive_read_disk_set_standard_lookup</b>,
<b>archive_read_disk_descend</b>,
<b>archive_read_disk_can_descend</b>,
<b>archive_read_disk_current_filesystem</b>,
<b>archive_read_disk_current_filesystem_is_synthetic</b>,
<b>archive_read_disk_current_filesystem_is_remote</b>,
<b>archive_read_disk_set_matching</b>,
<b>archive_read_disk_set_metadata_filter_callback</b>,
&mdash; functions for reading objects from disk</p>
a59 12
<p style="margin-left:12%;"><b>archive_read_disk_open</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_open_w</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;wchar_t&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


a119 40
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_descend</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_can_descend</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem_is_synthetic</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem_is_remote</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_set_matching</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>struct&nbsp;archive&nbsp;*</i>,
<i>void&nbsp;(*excluded_func)(struct&nbsp;archive&nbsp;*,&nbsp;void&nbsp;*,&nbsp;struct&nbsp;archive&nbsp;entry&nbsp;*)</i>,
<i>void&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>


<p><b>archive_read_disk_set_metadata_filter_callback</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>int&nbsp;(*metadata_filter_func)(struct&nbsp;archive&nbsp;*,&nbsp;void*,&nbsp;struct&nbsp;archive_entry&nbsp;*)</i>,
<i>void&nbsp;*</i>);</p>

a134 14
<p style="margin-top: 1em"><b>archive_read_disk_open</b>()</p>

<p style="margin-left:17%;">Opens the file or directory
from the given path and prepares the struct archive to read
it from disk.</p>


<p style="margin-top: 1em"><b>archive_read_disk_open_w</b>()</p>

<p style="margin-left:17%;">Opens the file or directory
from the given path as a wide character string and prepares
the struct archive to read it from disk.</p>


d146 1
a146 1
nodump file attribute is ignored.</p>
d169 1
a169 1
By default, mount points are traversed.</p>
a184 6
<p><b>ARCHIVE_READDISK_NO_SPARSE</b></p>

<p style="margin-left:27%;">Do not read sparse file
information. By default, sparse file information is read
from disk.</p>

d254 1
a254 1
group names using the currently-registered lookup functions
a257 59

<p style="margin-top: 1em"><b>archive_read_disk_descend</b>()</p>

<p style="margin-left:17%;">If the current entry can be
descended, this function will mark the directory as the next
entry for archive_read_header(3) to visit.</p>


<p style="margin-top: 1em"><b>archive_read_disk_can_descend</b>()</p>

<p style="margin-left:17%;">Returns 1 if the current entry
is an unvisited directory and 0 otherwise.</p>


<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem</b>()</p>

<p style="margin-left:17%;">Returns the index of the most
recent filesystem entry that has been visited through
archive_read_disk</p>


<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem_is_synthetic</b>()</p>

<p style="margin-left:17%;">Returns 1 if the current
filesystem is a virtual filesystem. Returns 0 if the current
filesystem is not a virtual filesystem. Returns -1 if it is
unknown.</p>


<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem_is_remote</b>()</p>

<p style="margin-left:17%;">Returns 1 if the current
filesystem is a remote filesystem. Returns 0 if the current
filesystem is not a remote filesystem. Returns -1 if it is
unknown.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_matching</b>()</p>

<p style="margin-left:17%;">Allows the caller to set struct
archive *_ma to compare each entry during
archive_read_header(3) calls. If matched based on calls to
archive_match_path_excluded, archive_match_time_excluded, or
archive_match_owner_excluded, then the callback function
specified by the _excluded_func parameter will execute. This
function will recieve data provided to the fourth parameter,
void *_client_data.</p>


<p style="margin-top: 1em"><b>archive_read_disk_set_metadata_filter_callback</b>()</p>

<p style="margin-left:17%;">Allows the caller to set a
callback function during calls to archive_read_header(3) to
filter out metadata for each entry. The callback function
recieves the struct archive object, void* custom filter
data, and the struct archive_entry. If the callback function
returns an error, ARCHIVE_RETRY will be returned and the
entry will not be further processed.</p>

d262 1
a262 1
<p style="margin-top: 1em"><b>EXAMPLES</b></p>
d329 1
a329 1
<p style="margin-left:6%;">tar(1), archive_read(3),
d331 1
a331 1
libarchive(3)</p>
@


1.1.1.11
log
@libarchive: import version 3.7.3
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Apr  7 22:36:26 2024 -->
@


1.1.1.12
log
@Libarchive 3.7.4 is a bugfix and security release

Security fixes:

rar: Fix OOB in rar e8 filter (CVE-2024-26256)
zip: Fix out of boundary access

Important bugfixes:

7zip: Limit amount of properties
bsdtar: Fix error handling around strtol() usages
passphrase: Improve newline handling on Windows
passphrase: Never allow empty passwords
rar: Fix "File CRC Error" when extracting specific rar4 archives
xar: Avoid infinite link loop
zip: Update AppleDouble support for directories
zstd: Implement core detection
@
text
@d2 1
a2 1
<!-- CreationDate: Fri Apr 26 09:23:46 2024 -->
d384 1
a384 1
function will receive data provided to the fourth parameter,
d393 1
a393 1
receives the struct archive object, void* custom filter
@


1.1.1.13
log
@libarchive: imported version 3.7.5

Libarchive 3.7.5

Security fixes:

fix multiple vulnerabilities identified by SAST
cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing
lzop: prevent integer overflow
rar4: protect copy_from_lzss_window_to_unp()
rar4: fix CVE-2024-26256
rar4: fix OOB in delta and audio filter
rar4: fix out of boundary access with large files
rar4: add boundary checks to rgb filter
rar4: fix OOB access with unicode filenames
rar5: clear 'data ready' cache on window buffer reallocs
rpm: calculate huge header sizes correctly
unzip: unify EOF handling
util: fix out of boundary access in mktemp functions
uu: stop processing if lines are too long

Important bugfixes:

7zip: fix issue when skipping first file in 7zip archive that is a multiple of 65536 bytes
ar: fix archive entries having no type
lha: do not allow negative file sizes
lha: fix integer truncation on 32-bit systems
shar: check strdup return value
rar5: don't try to read rediculously long names
xar: fix another infinite loop and expat error handling
many Windows fixes, cleanups and improvements
@
text
@d2 1
a2 1
<!-- CreationDate: Fri Sep 13 20:31:05 2024 -->
@


1.1.1.14
log
@libarchove: import version 3.7.7
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.23.0 -->
<!-- CreationDate: Sun Oct 13 08:12:09 2024 -->
d23 2
a24 2
<p><i>ARCHIVE_READ_DISK</i>(3) Library Functions Manual
<i>ARCHIVE_READ_DISK</i>(3)</p>
d28 21
a48 17
<p style="margin-left:9%;">archive_read_disk_new,
archive_read_disk_open, archive_read_disk_open_w,
archive_read_disk_set_behavior,
archive_read_disk_set_symlink_logical,
archive_read_disk_set_symlink_physical,
archive_read_disk_set_symlink_hybrid,
archive_read_disk_entry_from_file, archive_read_disk_gname,
archive_read_disk_uname, archive_read_disk_set_uname_lookup,
archive_read_disk_set_gname_lookup,
archive_read_disk_set_standard_lookup,
archive_read_disk_descend, archive_read_disk_can_descend,
archive_read_disk_current_filesystem,
archive_read_disk_current_filesystem_is_synthetic,
archive_read_disk_current_filesystem_is_remote,
archive_read_disk_set_matching,
archive_read_disk_set_metadata_filter_callback, &mdash;
functions for reading objects from disk</p>
d52 1
a52 1
<p style="margin-left:9%;">Streaming Archive Library
d57 1
a57 1
<p style="margin-left:9%;"><b>#include
d60 1
a60 1
<p style="margin-left:9%; margin-top: 1em"><i>struct
d64 1
a64 1
<p style="margin-left:14%;"><b>archive_read_disk_new</b>(<i>void</i>);</p>
d66 1
a66 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d69 1
a69 1
<p style="margin-left:14%;"><b>archive_read_disk_open</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d72 1
a72 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d75 1
a75 1
<p style="margin-left:14%;"><b>archive_read_disk_open_w</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d78 1
a78 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d81 1
a81 1
<p style="margin-left:14%;"><b>archive_read_disk_set_behavior</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d84 1
a84 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d87 1
a87 1
<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_logical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d89 1
a89 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d92 1
a92 1
<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_physical</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d94 1
a94 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d97 1
a97 1
<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d99 1
a99 1
<p style="margin-left:9%; margin-top: 1em"><i>const char
d103 1
a103 1
<p style="margin-left:14%;"><b>archive_read_disk_gname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d106 1
a106 1
<p style="margin-left:9%; margin-top: 1em"><i>const char
d110 1
a110 1
<p style="margin-left:14%;"><b>archive_read_disk_uname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
d113 1
a113 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d121 1
a121 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d129 1
a129 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d132 1
a132 1
<p style="margin-left:14%;"><b>archive_read_disk_set_standard_lookup</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d134 1
a134 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d141 1
a141 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d144 1
a144 1
<p style="margin-left:14%;"><b>archive_read_disk_descend</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d146 1
a146 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d149 1
a149 1
<p style="margin-left:14%;"><b>archive_read_disk_can_descend</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d151 1
a151 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d154 1
a154 1
<p style="margin-left:14%;"><b>archive_read_disk_current_filesystem</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d156 1
a156 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d159 1
a159 1
<p style="margin-left:14%;"><b>archive_read_disk_current_filesystem_is_synthetic</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d161 1
a161 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d164 1
a164 1
<p style="margin-left:14%;"><b>archive_read_disk_current_filesystem_is_remote</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
d166 1
a166 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d174 1
a174 1
<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
d183 1
a183 1
<p style="margin-left:9%;">These functions provide an API
d191 1
a191 1
<p style="margin-left:19%;">Allocates and initializes a
d198 1
a198 1
<p style="margin-left:19%;">Opens the file or directory
d205 1
a205 1
<p style="margin-left:19%;">Opens the file or directory
d212 1
a212 1
<p style="margin-left:19%;">Configures various behavior
d219 1
a219 1
<p style="margin-left:29%;">Skip files and directories with
d225 3
a227 4
<p style="margin-left:29%;">Mac OS X specific. Read
metadata (ACLs and extended attributes) with
<i>copyfile</i>(3). By default, metadata is read using
<i>copyfile</i>(3).</p>
d231 1
a231 1
<p style="margin-left:29%;">Do not read Access Control
d236 1
a236 1
<p style="margin-left:29%;">Do not read file attributes
d238 2
a239 3
disk. See <i>chattr</i>(1) (Linux) or <i>chflags</i>(1)
(FreeBSD, Mac OS X) for more information on file
attributes.</p>
d243 1
a243 1
<p style="margin-left:29%;">Do not traverse mount points.
d248 1
a248 1
<p style="margin-left:29%;">Do not read extended file
d250 3
a252 4
are read from disk. See <i>xattr</i>(7) (Linux),
<i>xattr</i>(2) (Mac OS X), or <i>getextattr</i>(8)
(FreeBSD) for more information on extended file
attributes.</p>
d256 1
a256 1
<p style="margin-left:29%;">Restore access time of
d262 1
a262 1
<p style="margin-left:29%;">Do not read sparse file
d271 1
a271 1
<p style="margin-left:19%;">This sets the mode used for
d282 1
a282 1
<p style="margin-left:19%;">Returns a user or group name
d290 1
a290 1
<p style="margin-left:19%;">These allow you to override the
d300 1
a300 1
<p style="margin-left:19%;">This convenience function
d302 5
a306 5
functions. These functions use <i>getpwuid</i>(3) and
<i>getgrgid</i>(3) to convert ids to names, defaulting to
NULL if the names cannot be looked up. These functions also
implement a simple memory cache to reduce the number of
calls to <i>getpwuid</i>(3) and <i>getgrgid</i>(3).</p>
d311 1
a311 1
<p style="margin-left:19%;">Populates a struct
d314 3
a316 3
created with <i>archive_entry_new</i>(3) and at least one of
the source path or path fields must already be set. (If both
are set, the source path will be used.)</p>
d318 1
a318 1
<p style="margin-left:19%; margin-top: 1em">Information is
d324 1
a324 1
<p style="margin-left:19%; margin-top: 1em">If a pointer to
d333 1
a333 1
<p style="margin-left:19%; margin-top: 1em">Where
d342 1
a342 1
<p style="margin-left:19%;">If the current entry can be
d344 1
a344 1
entry for <i>archive_read_header</i>(3) to visit.</p>
d349 1
a349 1
<p style="margin-left:19%;">Returns 1 if the current entry
d355 1
a355 1
<p style="margin-left:19%;">Returns the index of the most
d362 1
a362 1
<p style="margin-left:19%;">Returns 1 if the current
d370 1
a370 1
<p style="margin-left:19%;">Returns 1 if the current
d378 1
a378 1
<p style="margin-left:19%;">Allows the caller to set struct
d380 2
a381 3
<i>archive_read_header</i>(3) calls. If matched based on
calls to archive_match_path_excluded,
archive_match_time_excluded, or
d390 7
a396 8
<p style="margin-left:19%;">Allows the caller to set a
callback function during calls to
<i>archive_read_header</i>(3) to filter out metadata for
each entry. The callback function receives the struct
archive object, void* custom filter data, and the struct
archive_entry. If the callback function returns an error,
ARCHIVE_RETRY will be returned and the entry will not be
further processed.</p>
d398 1
a398 1
<p style="margin-left:9%;">More information about the
d400 1
a400 2
library can be found in the <i>libarchive</i>(3)
overview.</p>
d404 1
a404 1
<p style="margin-left:9%;">The following illustrates basic
d408 1
a408 1
<p style="margin-left:17%; margin-top: 1em">void <br>
d417 1
a417 1
<p style="margin-left:17%; margin-top: 1em">ard =
d438 1
a438 1
<p style="margin-left:9%;">Most functions return
d448 1
a448 1
<p style="margin-left:9%; margin-top: 1em"><b>archive_read_disk_new</b>()
d453 1
a453 1
<p style="margin-left:9%; margin-top: 1em"><b>archive_read_disk_gname</b>()
d463 1
a463 1
<p style="margin-left:9%;">Detailed error codes and textual
d469 3
a471 4
<p style="margin-left:9%;"><i>tar</i>(1),
<i>archive_read</i>(3), <i>archive_util</i>(3),
<i>archive_write</i>(3), <i>archive_write_disk</i>(3),
<i>libarchive</i>(3)</p>
d475 1
a475 1
<p style="margin-left:9%;">The <b>libarchive</b> library
d483 1
a483 1
<p style="margin-left:9%;">The <b>libarchive</b> library
d489 1
a489 1
<p style="margin-left:9%;">The &ldquo;standard&rdquo; user
d491 4
a494 4
because <i>getgrgid</i>(3) and <i>getpwuid</i>(3) are
sometimes too large for particular applications. The current
design allows the application author to use a more compact
implementation when appropriate.</p>
d496 1
a496 1
<p style="margin-left:9%; margin-top: 1em">The full list of
d501 1
a501 1
<p style="margin-left:9%; margin-top: 1em">The
d508 1
a508 1
<p style="margin-left:9%; margin-top: 1em">This API should
d510 6
a515 5
would make it a direct parallel of the
<i>archive_read</i>(3) API. When such methods are
implemented, the &ldquo;hybrid&rdquo; symbolic link mode
will make sense. Debian April 3, 2017
<i>ARCHIVE_READ_DISK</i>(3)</p>
@


1.1.1.15
log
@libarchive: imported version 3.7.9
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
@


1.1.1.16
log
@libarchive: import version 3.8.0

Libarchive 3.8.0 is a feature and bugfix release.

New features:
bsdtar: support --mtime and --clamp-mtime
lib: mbedtls 3.x compatibility
7-zip reader: improve self-extracting archive detection
xar: xmllite support for the XAR reader and writer
zip writer: added XZ, LZMA, ZSTD and BZIP2 support
zip writer: added LZMA + RISCV BCJ filter

Notable security fixes:
rar: do not skip past EOF while reading
rar: fix double free with over 4 billion nodes
rar: fix heap-buffer-overflow
warc: prevent signed integer overflow
tar: fix overflow in build_ustar_entry

Notable bugfixes:
bsdtar: don't hardlink negative inode files together
gz: allow setting the original filename for gzip compressed files
lib: improve lseek handling
lib: support @@-prefixed Unix epoch timestamps as date strings
rar: support large headers on 32 bit systems
tar reader: Improve LFS support on 32 bit systems
@
text
@d2 1
a2 1
<!-- CreationDate: Tue May 20 09:02:18 2025 -->
@


1.1.1.17
log
@libarchive: import version 3.8.1
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Jun  1 19:29:39 2025 -->
@


1.1.1.18
log
@libarchive: imported version 3.8.2
@
text
@d2 1
a2 1
<!-- CreationDate: Wed Oct 15 21:49:45 2025 -->
@


1.1.1.19
log
@libarchive: import version 3.8.3
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Nov 17 22:19:02 2025 -->
@


1.1.1.20
log
@libarchive: import 3.8.4
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Dec  1 12:42:37 2025 -->
@


1.1.1.21
log
@libarchive: import version 3.8.5
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jan  5 10:42:43 2026 -->
@


1.1.1.22
log
@libarchive: imported version 3.8.6
@
text
@d2 1
a2 1
<!-- CreationDate: Tue Mar 10 09:57:28 2026 -->
@


1.1.1.23
log
@libarchive: imported version 3.8.7
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Apr 13 12:57:33 2026 -->
@


1.1.1.24
log
@libarchive: import 3.8.8
@
text
@d2 1
a2 1
<!-- CreationDate: Tue Jun 23 09:58:12 2026 -->
@


