centos man page for tar_append_file

Query: tar_append_file

OS: centos

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

tar_append_file(3)						  C Library Calls						tar_append_file(3)

NAME
tar_append_file, tar_append_eof, tar_append_regfile - append data to tar archives
SYNOPSIS
#include <libtar.h> int tar_append_file(TAR *t, char *realname, char *savename); int tar_append_regfile(TAR *t, char *realname); int tar_append_eof(TAR *t);
VERSION
This man page documents version 1.2 of libtar.
DESCRIPTION
The tar_append_file() function creates a tar file header block describing the file named by the realname argument, but with the encoded filename of savename. It then sets the current header associated with the TAR handle t to the newly created header block, and writes this block to the tar archive associated with t. If the file named by realname is a regular file (and is not encoded as a hard link), tar_append_file() will call tar_append_regfile() to append the contents of the file. The tar_append_regfile() function appends the contents of a regular file to the tar archive associated with t. Since this function is called by tar_append_file(), it should only be necessary for applications that construct and write the tar file header on their own. The tar_append_eof() function writes an EOF marker (two blocks of all zeros) to the tar file associated with t.
RETURN VALUES
On successful completion, these functions will return 0. On failure, they will return -1 and set errno to an appropriate value.
ERRORS
The tar_append_*() functions will fail if: EINVAL Less than T_BLOCKSIZE bytes were written to the tar archive. EINVAL Less than T_BLOCKSIZE bytes were read from the realname file. They may also fail if any of the following functions fail: lstat(), malloc(), open(), read(), th_write(), or the write function for the file type associated with the TAR handle t.
SEE ALSO
read(2), open(2), lstat(2), th_write(3) University of Illinois Jan 2001 tar_append_file(3)
Related Man Pages
tar_extract_blockdev(3) - centos
tar_extract_chardev(3) - centos
tar_extract_fifo(3) - centos
tar_set_file_perms(3) - centos
tar_append_eof(3) - centos
Similar Topics in the Unix Linux Community
tar: write error: unexpected EOF
tar:read error: unexpected EOF
Reading the header of a tar file(posix header)
Problem with tar
Help with tar --append command output redirection