| .\" Copyright (c) 2003-2007 Tim Kientzle |
| .\" Copyright (c) 2010 Joerg Sonnenberger |
| .\" All rights reserved. |
| .\" |
| .\" Redistribution and use in source and binary forms, with or without |
| .\" modification, are permitted provided that the following conditions |
| .\" are met: |
| .\" 1. Redistributions of source code must retain the above copyright |
| .\" notice, this list of conditions and the following disclaimer. |
| .\" 2. Redistributions in binary form must reproduce the above copyright |
| .\" notice, this list of conditions and the following disclaimer in the |
| .\" documentation and/or other materials provided with the distribution. |
| .\" |
| .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
| .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
| .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| .\" SUCH DAMAGE. |
| .\" |
| .\" $FreeBSD$ |
| .\" |
| .Dd February 2, 2012 |
| .Dt ARCHIVE_ENTRY_TIME 3 |
| .Os |
| .Sh NAME |
| .Nm archive_entry_atime , |
| .Nm archive_entry_atime_nsec , |
| .Nm archive_entry_atime_is_set , |
| .Nm archive_entry_set_atime , |
| .Nm archive_entry_unset_atime , |
| .Nm archive_entry_birthtime , |
| .Nm archive_entry_birthtime_nsec , |
| .Nm archive_entry_birthtime_is_set , |
| .Nm archive_entry_set_birthtime , |
| .Nm archive_entry_unset_birthtime , |
| .Nm archive_entry_ctime , |
| .Nm archive_entry_ctime_nsec , |
| .Nm archive_entry_ctime_is_set , |
| .Nm archive_entry_set_ctime , |
| .Nm archive_entry_unset_ctime , |
| .Nm archive_entry_mtime , |
| .Nm archive_entry_mtime_nsec , |
| .Nm archive_entry_mtime_is_set , |
| .Nm archive_entry_set_mtime , |
| .Nm archive_entry_unset_mtime , |
| .Nd functions for manipulating times in archive entry descriptions |
| .Sh LIBRARY |
| Streaming Archive Library (libarchive, -larchive) |
| .Sh SYNOPSIS |
| .In archive_entry.h |
| .Ft time_t |
| .Fn archive_entry_atime "struct archive_entry *a" |
| .Ft long |
| .Fn archive_entry_atime_nsec "struct archive_entry *a" |
| .Ft int |
| .Fn archive_entry_atime_is_set "struct archive_entry *a" |
| .Ft void |
| .Fn archive_entry_set_atime "struct archive_entry *a" "time_t sec" "long nanosec" |
| .Ft void |
| .Fn archive_entry_unset_atime "struct archive_entry *a" |
| .Ft time_t |
| .Fn archive_entry_birthtime "struct archive_entry *a" |
| .Ft long |
| .Fn archive_entry_birthtime_nsec "struct archive_entry *a" |
| .Ft int |
| .Fn archive_entry_birthtime_is_set "struct archive_entry *a" |
| .Ft void |
| .Fn archive_entry_set_birthtime "struct archive_entry *a" "time_t sec" "long nanosec" |
| .Ft void |
| .Fn archive_entry_unset_birthtime "struct archive_entry *a" |
| .Ft time_t |
| .Fn archive_entry_ctime "struct archive_entry *a" |
| .Ft long |
| .Fn archive_entry_ctime_nsec "struct archive_entry *a" |
| .Ft int |
| .Fn archive_entry_ctime_is_set "struct archive_entry *a" |
| .Ft void |
| .Fn archive_entry_set_ctime "struct archive_entry *a" "time_t sec" "long nanosec" |
| .Ft void |
| .Fn archive_entry_unset_ctime "struct archive_entry *a" |
| .Ft time_t |
| .Fn archive_entry_mtime "struct archive_entry *a" |
| .Ft long |
| .Fn archive_entry_mtime_nsec "struct archive_entry *a" |
| .Ft int |
| .Fn archive_entry_mtime_is_set "struct archive_entry *a" |
| .Ft void |
| .Fn archive_entry_set_mtime "struct archive_entry *a" "time_t sec" "long nanosec" |
| .Ft void |
| .Fn archive_entry_unset_mtime "struct archive_entry *a" |
| .Sh DESCRIPTION |
| These functions create and manipulate the time fields in an |
| .Vt archive_entry . |
| Supported time fields are atime (access time), birthtime (creation time), |
| ctime (last time an inode property was changed) and mtime (modification time). |
| .Pp |
| .Xr libarchive 3 |
| provides a high-resolution interface. |
| The timestamps are truncated automatically depending on the archive format |
| (for archiving) or the filesystem capabilities (for restoring). |
| .Pp |
| All timestamp fields are optional. |
| The |
| .Fn XXX_unset |
| functions can be used to mark the corresponding field as missing. |
| The current state can be queried using |
| .Fn XXX_is_set . |
| Unset time fields have a second and nanosecond field of 0. |
| .Sh SEE ALSO |
| .Xr archive_entry 3 |
| .Xr libarchive 3 , |
| .Sh HISTORY |
| The |
| .Nm libarchive |
| library first appeared in |
| .Fx 5.3 . |
| .Sh AUTHORS |
| .An -nosplit |
| The |
| .Nm libarchive |
| library was written by |
| .An Tim Kientzle Aq kientzle@acm.org . |
| .\" .Sh BUGS |