1th_read(3)                      C Library Calls                     th_read(3)
2
3
4

NAME

6       th_read,  th_write  - read and write a file header block from a tar ar‐
7       chive
8

SYNOPSIS

10       #include <libtar.h>
11
12       int th_read(TAR *t);
13
14       int th_write(TAR *t);
15

VERSION

17       This man page documents version 1.2 of libtar.
18

DESCRIPTION

20       The th_read() function reads the next block from the tar archive  asso‐
21       ciated  with  the  TAR  handle  t.  It then sets the current tar header
22       associated with t to the contents of the block read.
23
24       The th_write() function writes the contents of the current  tar  header
25       associated with t to the tar archive associated with t.
26

RETURN VALUE

28       On  successful  completion, th_read() and th_write() will return 0.  On
29       failure, they will return -1 and set errno to an appropriate value.
30
31       On EOF, th_read() will return 1.
32

ERRORS

34       th_read() and th_write() will fail if:
35
36       EINVAL Less than T_BLOCKSIZE blocks were read or written.
37

SEE ALSO

39       tar_block_read(3), tar_block_write(3)
40
41
42
43University of Illinois             Jan 2001                         th_read(3)
Impressum