Deleted Added
full compact
archive_read_disk.3 (315432) archive_read_disk.3 (353376)
1.\" Copyright (c) 2003-2009 Tim Kientzle
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
1.\" Copyright (c) 2003-2009 Tim Kientzle
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: stable/11/contrib/libarchive/libarchive/archive_read_disk.3 315432 2017-03-16 23:07:35Z mm $
25.\" $FreeBSD: stable/11/contrib/libarchive/libarchive/archive_read_disk.3 353376 2019-10-09 22:19:06Z mm $
26.\"
26.\"
27.Dd December 30, 2016
27.Dd April 3, 2017
28.Dt ARCHIVE_READ_DISK 3
29.Os
30.Sh NAME
31.Nm archive_read_disk_new ,
28.Dt ARCHIVE_READ_DISK 3
29.Os
30.Sh NAME
31.Nm archive_read_disk_new ,
32.Nm archive_read_disk_set_behavior ,
32.Nm archive_read_disk_set_symlink_logical ,
33.Nm archive_read_disk_set_symlink_physical ,
34.Nm archive_read_disk_set_symlink_hybrid ,
35.Nm archive_read_disk_entry_from_file ,
36.Nm archive_read_disk_gname ,
37.Nm archive_read_disk_uname ,
38.Nm archive_read_disk_set_uname_lookup ,
39.Nm archive_read_disk_set_gname_lookup ,
40.Nm archive_read_disk_set_standard_lookup
41.Nd functions for reading objects from disk
42.Sh LIBRARY
43Streaming Archive Library (libarchive, -larchive)
44.Sh SYNOPSIS
45.In archive.h
46.Ft struct archive *
47.Fn archive_read_disk_new "void"
48.Ft int
33.Nm archive_read_disk_set_symlink_logical ,
34.Nm archive_read_disk_set_symlink_physical ,
35.Nm archive_read_disk_set_symlink_hybrid ,
36.Nm archive_read_disk_entry_from_file ,
37.Nm archive_read_disk_gname ,
38.Nm archive_read_disk_uname ,
39.Nm archive_read_disk_set_uname_lookup ,
40.Nm archive_read_disk_set_gname_lookup ,
41.Nm archive_read_disk_set_standard_lookup
42.Nd functions for reading objects from disk
43.Sh LIBRARY
44Streaming Archive Library (libarchive, -larchive)
45.Sh SYNOPSIS
46.In archive.h
47.Ft struct archive *
48.Fn archive_read_disk_new "void"
49.Ft int
50.Fn archive_read_disk_set_behavior "struct archive *" "int"
51.Ft int
49.Fn archive_read_disk_set_symlink_logical "struct archive *"
50.Ft int
51.Fn archive_read_disk_set_symlink_physical "struct archive *"
52.Ft int
53.Fn archive_read_disk_set_symlink_hybrid "struct archive *"
54.Ft const char *
55.Fn archive_read_disk_gname "struct archive *" "gid_t"
56.Ft const char *

--- 27 unchanged lines hidden (view full) ---

84In particular, they provide an interface for populating
85.Tn struct archive_entry
86objects.
87.Bl -tag -width indent
88.It Fn archive_read_disk_new
89Allocates and initializes a
90.Tn struct archive
91object suitable for reading object information from disk.
52.Fn archive_read_disk_set_symlink_logical "struct archive *"
53.Ft int
54.Fn archive_read_disk_set_symlink_physical "struct archive *"
55.Ft int
56.Fn archive_read_disk_set_symlink_hybrid "struct archive *"
57.Ft const char *
58.Fn archive_read_disk_gname "struct archive *" "gid_t"
59.Ft const char *

--- 27 unchanged lines hidden (view full) ---

87In particular, they provide an interface for populating
88.Tn struct archive_entry
89objects.
90.Bl -tag -width indent
91.It Fn archive_read_disk_new
92Allocates and initializes a
93.Tn struct archive
94object suitable for reading object information from disk.
95.It Fn archive_read_disk_set_behavior
96Configures various behavior options when reading entries from disk.
97The flags field consists of a bitwise OR of one or more of the
98following values:
99.Bl -tag -compact -width "indent"
100.It Cm ARCHIVE_READDISK_HONOR_NODUMP
101Skip files and directories with the nodump file attribute (file flag) set.
102By default, the nodump file attribute is ignored.
103.It Cm ARCHIVE_READDISK_MAC_COPYFILE
104Mac OS X specific.
105Read metadata (ACLs and extended attributes) with
106.Xr copyfile 3 .
107By default, metadata is read using
108.Xr copyfile 3 .
109.It Cm ARCHIVE_READDISK_NO_ACL
110Do not read Access Control Lists.
111By default, ACLs are read from disk.
112.It Cm ARCHIVE_READDISK_NO_FFLAGS
113Do not read file attributes (file flags).
114By default, file attributes are read from disk.
115See
116.Xr chattr 1
117.Pq Linux
118or
119.Xr chflags 1
120.Pq FreeBSD, Mac OS X
121for more information on file attributes.
122.It Cm ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS
123Do not traverse mount points.
124By default, mount points are traversed.
125.It Cm ARCHIVE_READDISK_NO_XATTR
126Do not read extended file attributes (xattrs).
127By default, extended file attributes are read from disk.
128See
129.Xr xattr 7
130.Pq Linux ,
131.Xr xattr 2
132.Pq Mac OS X ,
133or
134.Xr getextattr 8
135.Pq FreeBSD
136for more information on extended file attributes.
137.It Cm ARCHIVE_READDISK_RESTORE_ATIME
138Restore access time of traversed files.
139By default, access time of traversed files is not restored.
140.El
92.It Xo
93.Fn archive_read_disk_set_symlink_logical ,
94.Fn archive_read_disk_set_symlink_physical ,
95.Fn archive_read_disk_set_symlink_hybrid
96.Xc
97This sets the mode used for handling symbolic links.
98The
99.Dq logical

--- 63 unchanged lines hidden (view full) ---

163of reading from the disk where appropriate.
164This can provide performance benefits in scenarios where
165.Tn struct stat
166information has already been read from the disk as a side effect
167of some other operation.
168(For example, directory traversal libraries often provide this information.)
169.Pp
170Where necessary, user and group ids are converted to user and group names
141.It Xo
142.Fn archive_read_disk_set_symlink_logical ,
143.Fn archive_read_disk_set_symlink_physical ,
144.Fn archive_read_disk_set_symlink_hybrid
145.Xc
146This sets the mode used for handling symbolic links.
147The
148.Dq logical

--- 63 unchanged lines hidden (view full) ---

212of reading from the disk where appropriate.
213This can provide performance benefits in scenarios where
214.Tn struct stat
215information has already been read from the disk as a side effect
216of some other operation.
217(For example, directory traversal libraries often provide this information.)
218.Pp
219Where necessary, user and group ids are converted to user and group names
171using the currently registered lookup functions above.
220using the currently-registered lookup functions above.
172This affects the file ownership fields and ACL values in the
173.Tn struct archive_entry
174object.
175.El
176More information about the
177.Va struct archive
178object and the overall design of the library can be found in the
179.Xr libarchive 3
180overview.
221This affects the file ownership fields and ACL values in the
222.Tn struct archive_entry
223object.
224.El
225More information about the
226.Va struct archive
227object and the overall design of the library can be found in the
228.Xr libarchive 3
229overview.
181.Sh EXAMPLE
230.Sh EXAMPLES
182The following illustrates basic usage of the library by
183showing how to use it to copy an item on disk into an archive.
184.Bd -literal -offset indent
185void
186file_to_archive(struct archive *a, const char *name)
187{
188 char buff[8192];
189 size_t bytes_read;

--- 48 unchanged lines hidden (view full) ---

238.Sh ERRORS
239Detailed error codes and textual descriptions are available from the
240.Fn archive_errno
241and
242.Fn archive_error_string
243functions.
244.\"
245.Sh SEE ALSO
231The following illustrates basic usage of the library by
232showing how to use it to copy an item on disk into an archive.
233.Bd -literal -offset indent
234void
235file_to_archive(struct archive *a, const char *name)
236{
237 char buff[8192];
238 size_t bytes_read;

--- 48 unchanged lines hidden (view full) ---

287.Sh ERRORS
288Detailed error codes and textual descriptions are available from the
289.Fn archive_errno
290and
291.Fn archive_error_string
292functions.
293.\"
294.Sh SEE ALSO
295.Xr tar 1 ,
246.Xr archive_read 3 ,
247.Xr archive_util 3 ,
248.Xr archive_write 3 ,
249.Xr archive_write_disk 3 ,
296.Xr archive_read 3 ,
297.Xr archive_util 3 ,
298.Xr archive_write 3 ,
299.Xr archive_write_disk 3 ,
250.Xr tar 1 ,
251.Xr libarchive 3
252.Sh HISTORY
253The
254.Nm libarchive
255library first appeared in
256.Fx 5.3 .
257The
258.Nm archive_read_disk

--- 39 unchanged lines hidden ---
300.Xr libarchive 3
301.Sh HISTORY
302The
303.Nm libarchive
304library first appeared in
305.Fx 5.3 .
306The
307.Nm archive_read_disk

--- 39 unchanged lines hidden ---