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: src/lib/libarchive/archive_entry.3,v 1.18 2008/05/26 17:00:22 kientzle Exp $ 27.\" 28.Dd February 21, 2010 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 SYNOPSIS 54.In archive_entry.h 55.Ft time_t 56.Fn archive_entry_atime "struct archive_entry *a" 57.Ft long 58.Fn archive_entry_atime_nsec "struct archive_entry *a" 59.Ft int 60.Fn archive_entry_atime_is_set "struct archive_entry *a" 61.Ft void 62.Fn archive_entry_set_atime "struct archive_entry *a" "time_t sec" "long nanosec" 63.Ft void 64.Fn archive_entry_unset_atime "struct archive_entry *a" 65.Ft time_t 66.Fn archive_entry_birthtime "struct archive_entry *a" 67.Ft long 68.Fn archive_entry_birthtime_nsec "struct archive_entry *a" 69.Ft int 70.Fn archive_entry_birthtime_is_set "struct archive_entry *a" 71.Ft void 72.Fn archive_entry_set_birthtime "struct archive_entry *a" "time_t sec" "long nanosec" 73.Ft void 74.Fn archive_entry_unset_birthtime "struct archive_entry *a" 75.Ft time_t 76.Fn archive_entry_ctime "struct archive_entry *a" 77.Ft long 78.Fn archive_entry_ctime_nsec "struct archive_entry *a" 79.Ft int 80.Fn archive_entry_ctime_is_set "struct archive_entry *a" 81.Ft void 82.Fn archive_entry_set_ctime "struct archive_entry *a" "time_t sec" "long nanosec" 83.Ft void 84.Fn archive_entry_unset_ctime "struct archive_entry *a" 85.Ft time_t 86.Fn archive_entry_mtime "struct archive_entry *a" 87.Ft long 88.Fn archive_entry_mtime_nsec "struct archive_entry *a" 89.Ft int 90.Fn archive_entry_mtime_is_set "struct archive_entry *a" 91.Ft void 92.Fn archive_entry_set_mtime "struct archive_entry *a" "time_t sec" "long nanosec" 93.Ft void 94.Fn archive_entry_unset_mtime "struct archive_entry *a" 95.Sh DESCRIPTION 96These functions create and manipulate the time fields in an 97.Vt archive_entry . 98Supported time fields are atime (access time), birthtime (creation time), 99ctime (last time an inode property was changed) and mtime (modification time). 100.Pp 101.Xr libarchive 3 102provides a high-resolution interface. 103The timestamps are truncated automatically depending on the archive format 104(for archiving) or the filesystem capabilities (for restoring). 105.Pp 106All timestamp fields are optional. 107The 108.Fn XXX_unset 109functions can be used to mark the corresponding field as missing. 110The current state can be queried using 111.Fn XXX_is_set . 112Unset time fields have a second and nanosecond field of 0. 113.Sh SEE ALSO 114.Xr archive 3 , 115.Xr archive_entry 3 116.Sh HISTORY 117The 118.Nm libarchive 119library first appeared in 120.Fx 5.3 . 121.Sh AUTHORS 122.An -nosplit 123The 124.Nm libarchive 125library was written by 126.An Tim Kientzle Aq kientzle@acm.org . 127.\" .Sh BUGS 128