1.\" Copyright (c) 2003-2007 Tim Kientzle 2.\" Copyright (c) 2010 Joerg Sonnenberger 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" 28.Dd February 2, 2012 29.Dt ARCHIVE_ENTRY_TIME 3 30.Os 31.Sh NAME 32.Nm archive_entry_atime , 33.Nm archive_entry_atime_nsec , 34.Nm archive_entry_atime_is_set , 35.Nm archive_entry_set_atime , 36.Nm archive_entry_unset_atime , 37.Nm archive_entry_birthtime , 38.Nm archive_entry_birthtime_nsec , 39.Nm archive_entry_birthtime_is_set , 40.Nm archive_entry_set_birthtime , 41.Nm archive_entry_unset_birthtime , 42.Nm archive_entry_ctime , 43.Nm archive_entry_ctime_nsec , 44.Nm archive_entry_ctime_is_set , 45.Nm archive_entry_set_ctime , 46.Nm archive_entry_unset_ctime , 47.Nm archive_entry_mtime , 48.Nm archive_entry_mtime_nsec , 49.Nm archive_entry_mtime_is_set , 50.Nm archive_entry_set_mtime , 51.Nm archive_entry_unset_mtime 52.Nd functions for manipulating times in archive entry descriptions 53.Sh LIBRARY 54Streaming Archive Library (libarchive, -larchive) 55.Sh SYNOPSIS 56.In archive_entry.h 57.Ft time_t 58.Fn archive_entry_atime "struct archive_entry *a" 59.Ft long 60.Fn archive_entry_atime_nsec "struct archive_entry *a" 61.Ft int 62.Fn archive_entry_atime_is_set "struct archive_entry *a" 63.Ft void 64.Fn archive_entry_set_atime "struct archive_entry *a" "time_t sec" "long nanosec" 65.Ft void 66.Fn archive_entry_unset_atime "struct archive_entry *a" 67.Ft time_t 68.Fn archive_entry_birthtime "struct archive_entry *a" 69.Ft long 70.Fn archive_entry_birthtime_nsec "struct archive_entry *a" 71.Ft int 72.Fn archive_entry_birthtime_is_set "struct archive_entry *a" 73.Ft void 74.Fn archive_entry_set_birthtime "struct archive_entry *a" "time_t sec" "long nanosec" 75.Ft void 76.Fn archive_entry_unset_birthtime "struct archive_entry *a" 77.Ft time_t 78.Fn archive_entry_ctime "struct archive_entry *a" 79.Ft long 80.Fn archive_entry_ctime_nsec "struct archive_entry *a" 81.Ft int 82.Fn archive_entry_ctime_is_set "struct archive_entry *a" 83.Ft void 84.Fn archive_entry_set_ctime "struct archive_entry *a" "time_t sec" "long nanosec" 85.Ft void 86.Fn archive_entry_unset_ctime "struct archive_entry *a" 87.Ft time_t 88.Fn archive_entry_mtime "struct archive_entry *a" 89.Ft long 90.Fn archive_entry_mtime_nsec "struct archive_entry *a" 91.Ft int 92.Fn archive_entry_mtime_is_set "struct archive_entry *a" 93.Ft void 94.Fn archive_entry_set_mtime "struct archive_entry *a" "time_t sec" "long nanosec" 95.Ft void 96.Fn archive_entry_unset_mtime "struct archive_entry *a" 97.Sh DESCRIPTION 98These functions create and manipulate the time fields in an 99.Vt archive_entry . 100Supported time fields are atime (access time), birthtime (creation time), 101ctime (last time an inode property was changed) and mtime (modification time). 102.Pp 103.Xr libarchive 3 104provides a high-resolution interface. 105The timestamps are truncated automatically depending on the archive format 106(for archiving) or the filesystem capabilities (for restoring). 107.Pp 108All timestamp fields are optional. 109The 110.Fn XXX_unset 111functions can be used to mark the corresponding field as missing. 112The current state can be queried using 113.Fn XXX_is_set . 114Unset time fields have a second and nanosecond field of 0. 115.Sh SEE ALSO 116.Xr archive_entry 3 117.Xr libarchive 3 , 118.Sh HISTORY 119The 120.Nm libarchive 121library first appeared in 122.Fx 5.3 . 123.Sh AUTHORS 124.An -nosplit 125The 126.Nm libarchive 127library was written by 128.An Tim Kientzle Aq kientzle@acm.org . 129.\" .Sh BUGS 130