~ubuntu-branches/ubuntu/quantal/libarchive/quantal

« back to all changes in this revision

Viewing changes to doc/wiki/ManPageArchiveEntryStat3.wiki

  • Committer: Package Import Robot
  • Author(s): Andres Mejia
  • Date: 2012-02-23 19:29:24 UTC
  • mfrom: (8.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20120223192924-73n4iedok5fwgsyr
Tags: 3.0.3-5
* Detect if locales or locales-all is installed for use with test suite.
* Bump Standards-Version to 3.9.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#summary ARCHIVE_ENTRY 3 manual page
 
2
== NAME ==
 
3
*archive_entry_stat*,
 
4
*archive_entry_copy_stat*,
 
5
*archive_entry_filetype*,
 
6
*archive_entry_set_filetype*,
 
7
*archive_entry_mode*,
 
8
*archive_entry_set_mode*,
 
9
*archive_entry_size*,
 
10
*archive_entry_size_is_set*,
 
11
*archive_entry_set_size*,
 
12
*archive_entry_unset_size*,
 
13
*archive_entry_dev*,
 
14
*archive_entry_set_dev*,
 
15
*archive_entry_dev_is_set*,
 
16
*archive_entry_devmajor*,
 
17
*archive_entry_set_devmajor*,
 
18
*archive_entry_devminor*,
 
19
*archive_entry_set_devminor*,
 
20
*archive_entry_ino*,
 
21
*archive_entry_set_ino*,
 
22
*archive_entry_ino_is_set*,
 
23
*archive_entry_ino64*,
 
24
*archive_entry_set_ino64*,
 
25
*archive_entry_nlink*,
 
26
*archive_entry_rdev*,
 
27
*archive_entry_set_rdev*,
 
28
*archive_entry_rdevmajor*,
 
29
*archive_entry_set_rdevmajor*,
 
30
*archive_entry_rdevminor*,
 
31
*archive_entry_set_rdevminor*,
 
32
- accessor functions for manipulating archive entry descriptions
 
33
== SYNOPSIS ==
 
34
*#include <archive_entry.h>*
 
35
<br>
 
36
*const struct stat `*`*
 
37
<br>
 
38
*archive_entry_stat*(_struct archive_entry `*`a_);
 
39
<br>
 
40
*void*
 
41
<br>
 
42
*archive_entry_copy_stat*(_struct archive_entry `*`a_, _const struct stat `*`sb_);
 
43
<br>
 
44
*mode_t*
 
45
<br>
 
46
*archive_entry_filetype*(_struct archive_entry `*`a_);
 
47
<br>
 
48
*void*
 
49
<br>
 
50
*archive_entry_set_filetype*(_struct archive_entry `*`a_, _unsigned int type_);
 
51
<br>
 
52
*mode_t*
 
53
<br>
 
54
*archive_entry_mode*(_struct archive_entry `*`a_);
 
55
<br>
 
56
*void*
 
57
<br>
 
58
*archive_entry_set_mode*(_struct archive_entry `*`a_, _mode_t mode_);
 
59
<br>
 
60
*int64_t*
 
61
<br>
 
62
*archive_entry_size*(_struct archive_entry `*`a_);
 
63
<br>
 
64
*int*
 
65
<br>
 
66
*archive_entry_size_is_set*(_struct archive_entry `*`a_);
 
67
<br>
 
68
*void*
 
69
<br>
 
70
*archive_entry_set_size*(_struct archive_entry `*`a_, _int64_t size_);
 
71
<br>
 
72
*void*
 
73
<br>
 
74
*archive_entry_unset_size*(_struct archive_entry `*`a_);
 
75
<br>
 
76
*dev_t*
 
77
<br>
 
78
*archive_entry_dev*(_struct archive_entry `*`a_);
 
79
<br>
 
80
*void*
 
81
<br>
 
82
*archive_entry_set_dev*(_struct archive_entry `*`a_, _dev_t dev_);
 
83
<br>
 
84
*int*
 
85
<br>
 
86
*archive_entry_dev_is_set*(_struct archive_entry `*`a_);
 
87
<br>
 
88
*dev_t*
 
89
<br>
 
90
*archive_entry_devmajor*(_struct archive_entry `*`a_);
 
91
<br>
 
92
*void*
 
93
<br>
 
94
*archive_entry_set_devmajor*(_struct archive_entry `*`a_, _dev_t major_);
 
95
<br>
 
96
*dev_t*
 
97
<br>
 
98
*archive_entry_devminor*(_struct archive_entry `*`a_);
 
99
<br>
 
100
*void*
 
101
<br>
 
102
*archive_entry_set_devminor*(_struct archive_entry `*`a_, _dev_t minor_);
 
103
<br>
 
104
*ino_t*
 
105
<br>
 
106
*archive_entry_ino*(_struct archive_entry `*`a_);
 
107
<br>
 
108
*void*
 
109
<br>
 
110
*archive_entry_set_ino*(_struct archive_entry `*`a_, _unsigned long ino_);
 
111
<br>
 
112
*int*
 
113
<br>
 
114
*archive_entry_ino_is_set*(_struct archive_entry `*`a_);
 
115
<br>
 
116
*int64_t*
 
117
<br>
 
118
*archive_entry_ino64*(_struct archive_entry `*`a_);
 
119
<br>
 
120
*void*
 
121
<br>
 
122
*archive_entry_set_ino64*(_struct archive_entry `*`a_, _int64_t ino_);
 
123
<br>
 
124
*unsigned int*
 
125
<br>
 
126
*archive_entry_nlink*(_struct archive_entry `*`a_);
 
127
<br>
 
128
*void*
 
129
<br>
 
130
*archive_entry_set_nlink*(_struct archive_entry `*`a_, _unsigned int count_);
 
131
<br>
 
132
*dev_t*
 
133
<br>
 
134
*archive_entry_rdev*(_struct archive_entry `*`a_);
 
135
<br>
 
136
*dev_t*
 
137
<br>
 
138
*archive_entry_rdevmajor*(_struct archive_entry `*`a_);
 
139
<br>
 
140
*dev_t*
 
141
<br>
 
142
*archive_entry_rdevminor*(_struct archive_entry `*`a_);
 
143
<br>
 
144
*void*
 
145
<br>
 
146
*archive_entry_set_rdev*(_struct archive_entry `*`a_, _dev_t dev_);
 
147
<br>
 
148
*void*
 
149
<br>
 
150
*archive_entry_set_rdevmajor*(_struct archive_entry `*`a_, _dev_t major_);
 
151
<br>
 
152
*void*
 
153
<br>
 
154
*archive_entry_set_rdevminor*(_struct archive_entry `*`a_, _dev_t minor_);
 
155
== DESCRIPTION ==
 
156
=== Copying to and from _struct_ stat===
 
157
The function
 
158
*archive_entry_stat*()
 
159
converts the various fields stored in the archive entry to the format
 
160
used by
 
161
*stat*(2).
 
162
The return value remains valid until either
 
163
*archive_entry_clear*()
 
164
or
 
165
*archive_entry_free*()
 
166
is called.
 
167
It is not affected by calls to the set accessor functions.
 
168
It currently sets the following values in
 
169
_struct_ stat:
 
170
_st_atime_,
 
171
_st_ctime_,
 
172
_st_dev_,
 
173
_st_gid_,
 
174
_st_ino_,
 
175
_st_mode_,
 
176
_st_mtime_,
 
177
_st_nlink_,
 
178
_st_rdev_,
 
179
_st_size_,
 
180
_st_uid_.
 
181
In addition,
 
182
_st_birthtime_
 
183
and high-precision information for time-related fields
 
184
will be included on platforms that support it.
 
185
 
 
186
The function
 
187
*archive_entry_copy_stat*()
 
188
copies fields from the platform's
 
189
_struct_ stat.
 
190
Fields not provided by
 
191
_struct_ stat
 
192
are unchanged.
 
193
=== General accessor functions===
 
194
The functions
 
195
*archive_entry_filetype*()
 
196
and
 
197
*archive_entry_set_filetype*()
 
198
get respectively set the filetype.
 
199
The file type is one of the following constants:
 
200
<dl>
 
201
<dt>AE_IFREG</dt><dd>
 
202
Regular file
 
203
</dd><dt>AE_IFLNK</dt><dd>
 
204
Symbolic link
 
205
</dd><dt>AE_IFSOCK</dt><dd>
 
206
Socket
 
207
</dd><dt>AE_IFCHR</dt><dd>
 
208
Character device
 
209
</dd><dt>AE_IFBLK</dt><dd>
 
210
Block device
 
211
</dd><dt>AE_IFDIR</dt><dd>
 
212
Directory
 
213
</dd><dt>AE_IFIFO</dt><dd>
 
214
Named pipe (fifo)
 
215
</dd></dl>
 
216
Not all file types are supported by all platforms.
 
217
The constants used by
 
218
*stat*(2)
 
219
may have different numeric values from the
 
220
corresponding constants above.
 
221
 
 
222
The functions
 
223
*archive_entry_mode*()
 
224
and
 
225
*archive_entry_set_mode*()
 
226
get/set a combination of file type and permissions and provide the
 
227
equivalent of
 
228
_st_mode_.
 
229
Use of
 
230
*archive_entry_filetype*()
 
231
and
 
232
*archive_entry_perm*()
 
233
for getting and
 
234
*archive_entry_set_filetype*()
 
235
and
 
236
*archive_entry_set_perm*()
 
237
for setting is recommended.
 
238
 
 
239
The function
 
240
*archive_entry_size*()
 
241
returns the file size, if it has been set, and 0 otherwise.
 
242
*archive_entry_size*()
 
243
can be used to query that status.
 
244
*archive_entry_set_size*()
 
245
and
 
246
*archive_entry_unset_size*()
 
247
set and unset the size, respectively.
 
248
 
 
249
The number of references (hardlinks) can be obtained by calling
 
250
*archive_entry_nlinks*()
 
251
and set with
 
252
*archive_entry_set_nlinks*().
 
253
=== Identifying unique files===
 
254
The functions
 
255
*archive_entry_dev*()
 
256
and
 
257
*archive_entry_ino64*()
 
258
are used by
 
259
*archive_entry_linkify*(3)
 
260
to find hardlinks.
 
261
The pair of device and inode is suppossed to identify hardlinked files.
 
262
 
 
263
The device major and minor number can be obtained independently using
 
264
*archive_entry_devmajor*()
 
265
and
 
266
*archive_entry_devminor*().
 
267
The device can be set either via
 
268
*archive_entry_set_dev*()
 
269
or by the combination of major and minor number using
 
270
*archive_entry_set_devmajor*()
 
271
and
 
272
*archive_entry_set_devminor*().
 
273
 
 
274
The inode number can be obtained using
 
275
*archive_entry_ino*().
 
276
This is a legacy interface that uses the platform
 
277
_ino_t_,
 
278
which may be very small.
 
279
To set the inode number,
 
280
*archive_entry_set_ino64*()
 
281
is the preferred interface.
 
282
=== Accessor functions for block and character devices===
 
283
Block and character devices are characterised either using a device number
 
284
or a pair of major and minor number.
 
285
The combined device number can be obtained with
 
286
*archive_device_rdev*()
 
287
and set with
 
288
*archive_device_set_rdev*().
 
289
The major and minor numbers are accessed by
 
290
*archive_device_rdevmajor*(),
 
291
*archive_device_rdevminor*()
 
292
*archive_device_set_rdevmajor*()
 
293
and
 
294
*archive_device_set_rdevminor*().
 
295
 
 
296
The process of splitting the combined device number into major and
 
297
minor number and the reverse process of combing them differs between
 
298
platforms.
 
299
Some archive formats use the combined form, while other formats use
 
300
the split form.
 
301
== SEE ALSO ==
 
302
*archive*(3),
 
303
*archive_entry_acl*(3),
 
304
*archive_entry_perms*(3),
 
305
*archive_entry_time*(3),
 
306
*stat*(2)