tar_append_eof(3) - Linux man page
Name
tar_append_file, tar_append_eof, tar_append_regfile - append data to tar archivesSynopsis
#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_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.
