1th_set_from_stat(3) C Library Calls th_set_from_stat(3)
2
3
4
6 th_set_from_stat, th_finish, th_set_type, th_set_path, th_set_link,
7 th_set_device, th_set_user, th_set_group, th_set_mode, th_set_mtime,
8 th_set_size - set fields of a tar file header
9
11 #include <libtar.h>
12
13 void th_set_from_stat(TAR *t, struct stat *s);
14
15 void th_set_type(TAR *t, mode_t mode);
16
17 void th_set_path(TAR *t, char *pathname);
18
19 void th_set_link(TAR *t, char *linkname);
20
21 void th_set_device(TAR *t, dev_t device);
22
23 void th_set_user(TAR *t, uid_t uid);
24
25 void th_set_group(TAR *t, gid_t gid);
26
27 void th_set_mode(TAR *t, mode_t mode);
28
29 void th_set_mtime(TAR *t, time_t fmtime);
30
31 void th_set_size(TAR *t, off_t fsize);
32
33 void th_finish(TAR *t);
34
36 This man page documents version 1.2 of libtar.
37
39 The th_set_*() functions each set an individual field of the current
40 tar header associated with the TAR handle t. The th_set_user() and
41 th_set_group() functions set both the numeric user/group ID fields and
42 the user/group name text fields. The other functions set only the
43 field that they refer to.
44
45 The th_set_from_stat() function uses the other th_set_*() functions to
46 set all of the fields at once, based on the data passed to it in the
47 argument s.
48
49 The th_finish() function sets the appropriate constants for the magic
50 and version fields. It then calculates the header checksum and fills
51 in the checksum field.
52
54 lstat(2)
55
56
57
58University of Illinois Jan 2001 th_set_from_stat(3)