summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_entry_time.3
blob: 17c658a65817eda869916c621a07fbcfee5c720d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.\" 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 3 ,
.Xr archive_entry 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