1
#summary ARCHIVE_ENTRY 3 manual page
4
*archive_entry_copy_stat*,
5
*archive_entry_filetype*,
6
*archive_entry_set_filetype*,
8
*archive_entry_set_mode*,
10
*archive_entry_size_is_set*,
11
*archive_entry_set_size*,
12
*archive_entry_unset_size*,
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*,
21
*archive_entry_set_ino*,
22
*archive_entry_ino_is_set*,
23
*archive_entry_ino64*,
24
*archive_entry_set_ino64*,
25
*archive_entry_nlink*,
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
34
*#include <archive_entry.h>*
36
*const struct stat `*`*
38
*archive_entry_stat*(_struct archive_entry `*`a_);
42
*archive_entry_copy_stat*(_struct archive_entry `*`a_, _const struct stat `*`sb_);
46
*archive_entry_filetype*(_struct archive_entry `*`a_);
50
*archive_entry_set_filetype*(_struct archive_entry `*`a_, _unsigned int type_);
54
*archive_entry_mode*(_struct archive_entry `*`a_);
58
*archive_entry_set_mode*(_struct archive_entry `*`a_, _mode_t mode_);
62
*archive_entry_size*(_struct archive_entry `*`a_);
66
*archive_entry_size_is_set*(_struct archive_entry `*`a_);
70
*archive_entry_set_size*(_struct archive_entry `*`a_, _int64_t size_);
74
*archive_entry_unset_size*(_struct archive_entry `*`a_);
78
*archive_entry_dev*(_struct archive_entry `*`a_);
82
*archive_entry_set_dev*(_struct archive_entry `*`a_, _dev_t dev_);
86
*archive_entry_dev_is_set*(_struct archive_entry `*`a_);
90
*archive_entry_devmajor*(_struct archive_entry `*`a_);
94
*archive_entry_set_devmajor*(_struct archive_entry `*`a_, _dev_t major_);
98
*archive_entry_devminor*(_struct archive_entry `*`a_);
102
*archive_entry_set_devminor*(_struct archive_entry `*`a_, _dev_t minor_);
106
*archive_entry_ino*(_struct archive_entry `*`a_);
110
*archive_entry_set_ino*(_struct archive_entry `*`a_, _unsigned long ino_);
114
*archive_entry_ino_is_set*(_struct archive_entry `*`a_);
118
*archive_entry_ino64*(_struct archive_entry `*`a_);
122
*archive_entry_set_ino64*(_struct archive_entry `*`a_, _int64_t ino_);
126
*archive_entry_nlink*(_struct archive_entry `*`a_);
130
*archive_entry_set_nlink*(_struct archive_entry `*`a_, _unsigned int count_);
134
*archive_entry_rdev*(_struct archive_entry `*`a_);
138
*archive_entry_rdevmajor*(_struct archive_entry `*`a_);
142
*archive_entry_rdevminor*(_struct archive_entry `*`a_);
146
*archive_entry_set_rdev*(_struct archive_entry `*`a_, _dev_t dev_);
150
*archive_entry_set_rdevmajor*(_struct archive_entry `*`a_, _dev_t major_);
154
*archive_entry_set_rdevminor*(_struct archive_entry `*`a_, _dev_t minor_);
156
=== Copying to and from _struct_ stat===
158
*archive_entry_stat*()
159
converts the various fields stored in the archive entry to the format
162
The return value remains valid until either
163
*archive_entry_clear*()
165
*archive_entry_free*()
167
It is not affected by calls to the set accessor functions.
168
It currently sets the following values in
183
and high-precision information for time-related fields
184
will be included on platforms that support it.
187
*archive_entry_copy_stat*()
188
copies fields from the platform's
190
Fields not provided by
193
=== General accessor functions===
195
*archive_entry_filetype*()
197
*archive_entry_set_filetype*()
198
get respectively set the filetype.
199
The file type is one of the following constants:
201
<dt>AE_IFREG</dt><dd>
203
</dd><dt>AE_IFLNK</dt><dd>
205
</dd><dt>AE_IFSOCK</dt><dd>
207
</dd><dt>AE_IFCHR</dt><dd>
209
</dd><dt>AE_IFBLK</dt><dd>
211
</dd><dt>AE_IFDIR</dt><dd>
213
</dd><dt>AE_IFIFO</dt><dd>
216
Not all file types are supported by all platforms.
217
The constants used by
219
may have different numeric values from the
220
corresponding constants above.
223
*archive_entry_mode*()
225
*archive_entry_set_mode*()
226
get/set a combination of file type and permissions and provide the
230
*archive_entry_filetype*()
232
*archive_entry_perm*()
234
*archive_entry_set_filetype*()
236
*archive_entry_set_perm*()
237
for setting is recommended.
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*()
246
*archive_entry_unset_size*()
247
set and unset the size, respectively.
249
The number of references (hardlinks) can be obtained by calling
250
*archive_entry_nlinks*()
252
*archive_entry_set_nlinks*().
253
=== Identifying unique files===
255
*archive_entry_dev*()
257
*archive_entry_ino64*()
259
*archive_entry_linkify*(3)
261
The pair of device and inode is suppossed to identify hardlinked files.
263
The device major and minor number can be obtained independently using
264
*archive_entry_devmajor*()
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*()
272
*archive_entry_set_devminor*().
274
The inode number can be obtained using
275
*archive_entry_ino*().
276
This is a legacy interface that uses the platform
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*()
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*()
294
*archive_device_set_rdevminor*().
296
The process of splitting the combined device number into major and
297
minor number and the reverse process of combing them differs between
299
Some archive formats use the combined form, while other formats use
303
*archive_entry_acl*(3),
304
*archive_entry_perms*(3),
305
*archive_entry_time*(3),