archive_read_disk.3 (228763) | archive_read_disk.3 (228773) |
---|---|
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: head/contrib/libarchive/libarchive/archive_read_disk.3 228763 2011-12-21 11:13:29Z mm $ | 25.\" $FreeBSD: head/contrib/libarchive/libarchive/archive_read_disk.3 228773 2011-12-21 15:18:52Z mm $ |
26.\" 27.Dd March 10, 2009 | 26.\" 27.Dd March 10, 2009 |
28.Dt archive_read_disk 3 | 28.Dt ARCHIVE_READ_DISK 3 |
29.Os 30.Sh NAME 31.Nm archive_read_disk_new , 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.Nm archive_read_close , | 29.Os 30.Sh NAME 31.Nm archive_read_disk_new , 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.Nm archive_read_close , |
42.Nm archive_read_finish | 42.Nm archive_read_free |
43.Nd functions for reading objects from disk 44.Sh SYNOPSIS 45.In archive.h 46.Ft struct archive * 47.Fn archive_read_disk_new "void" 48.Ft int 49.Fn archive_read_disk_set_symlink_logical "struct archive *" 50.Ft int --- 25 unchanged lines hidden (view full) --- 76.Fa "struct archive *" 77.Fa "struct archive_entry *" 78.Fa "int fd" 79.Fa "const struct stat *" 80.Fc 81.Ft int 82.Fn archive_read_close "struct archive *" 83.Ft int | 43.Nd functions for reading objects from disk 44.Sh SYNOPSIS 45.In archive.h 46.Ft struct archive * 47.Fn archive_read_disk_new "void" 48.Ft int 49.Fn archive_read_disk_set_symlink_logical "struct archive *" 50.Ft int --- 25 unchanged lines hidden (view full) --- 76.Fa "struct archive *" 77.Fa "struct archive_entry *" 78.Fa "int fd" 79.Fa "const struct stat *" 80.Fc 81.Ft int 82.Fn archive_read_close "struct archive *" 83.Ft int |
84.Fn archive_read_finish "struct archive *" | 84.Fn archive_read_free "struct archive *" |
85.Sh DESCRIPTION 86These functions provide an API for reading information about 87objects on disk. 88In particular, they provide an interface for populating 89.Tn struct archive_entry 90objects. 91.Bl -tag -width indent 92.It Fn archive_read_disk_new --- 80 unchanged lines hidden (view full) --- 173.Pp 174Where necessary, user and group ids are converted to user and group names 175using the currently registered lookup functions above. 176This affects the file ownership fields and ACL values in the 177.Tn struct archive_entry 178object. 179.It Fn archive_read_close 180This currently does nothing. | 85.Sh DESCRIPTION 86These functions provide an API for reading information about 87objects on disk. 88In particular, they provide an interface for populating 89.Tn struct archive_entry 90objects. 91.Bl -tag -width indent 92.It Fn archive_read_disk_new --- 80 unchanged lines hidden (view full) --- 173.Pp 174Where necessary, user and group ids are converted to user and group names 175using the currently registered lookup functions above. 176This affects the file ownership fields and ACL values in the 177.Tn struct archive_entry 178object. 179.It Fn archive_read_close 180This currently does nothing. |
181.It Fn archive_write_finish | 181.It Fn archive_read_free |
182Invokes | 182Invokes |
183.Fn archive_write_close | 183.Fn archive_read_close |
184if it was not invoked manually, then releases all resources. 185.El 186More information about the 187.Va struct archive 188object and the overall design of the library can be found in the 189.Xr libarchive 3 190overview. 191.Sh EXAMPLE --- 16 unchanged lines hidden (view full) --- 208 if (fd < 0) 209 return; 210 archive_entry_copy_sourcepath(entry, name); 211 archive_read_disk_entry_from_file(ard, entry, fd, NULL); 212 archive_write_header(a, entry); 213 while ((bytes_read = read(fd, buff, sizeof(buff))) > 0) 214 archive_write_data(a, buff, bytes_read); 215 archive_write_finish_entry(a); | 184if it was not invoked manually, then releases all resources. 185.El 186More information about the 187.Va struct archive 188object and the overall design of the library can be found in the 189.Xr libarchive 3 190overview. 191.Sh EXAMPLE --- 16 unchanged lines hidden (view full) --- 208 if (fd < 0) 209 return; 210 archive_entry_copy_sourcepath(entry, name); 211 archive_read_disk_entry_from_file(ard, entry, fd, NULL); 212 archive_write_header(a, entry); 213 while ((bytes_read = read(fd, buff, sizeof(buff))) > 0) 214 archive_write_data(a, buff, bytes_read); 215 archive_write_finish_entry(a); |
216 archive_read_finish(ard); | 216 archive_read_free(ard); |
217 archive_entry_free(entry); 218} 219.Ed 220.Sh RETURN VALUES 221Most functions return 222.Cm ARCHIVE_OK 223(zero) on success, or one of several negative 224error codes for errors. --- 46 unchanged lines hidden (view full) --- 271.Nm libarchive 2.6 272and first appeared in 273.Fx 8.0 . 274.Sh AUTHORS 275.An -nosplit 276The 277.Nm libarchive 278library was written by | 217 archive_entry_free(entry); 218} 219.Ed 220.Sh RETURN VALUES 221Most functions return 222.Cm ARCHIVE_OK 223(zero) on success, or one of several negative 224error codes for errors. --- 46 unchanged lines hidden (view full) --- 271.Nm libarchive 2.6 272and first appeared in 273.Fx 8.0 . 274.Sh AUTHORS 275.An -nosplit 276The 277.Nm libarchive 278library was written by |
279.An Tim Kientzle Aq kientzle@freebsd.org . | 279.An Tim Kientzle Aq kientzle@FreeBSD.org . |
280.Sh BUGS 281The 282.Dq standard 283user name and group name lookup functions are not the defaults because 284.Xr getgrgid 3 285and 286.Xr getpwuid 3 287are sometimes too large for particular applications. --- 21 unchanged lines hidden --- | 280.Sh BUGS 281The 282.Dq standard 283user name and group name lookup functions are not the defaults because 284.Xr getgrgid 3 285and 286.Xr getpwuid 3 287are sometimes too large for particular applications. --- 21 unchanged lines hidden --- |