go to
> read(2)
> open(2)
> lstat(2)
Homepage > Man Pages > Category > Subroutines
Homepage > Man Pages > Name > T


man page of tar_append_file

tar_append_file: append data to tar archives


tar_append_file, tar_append_eof, tar_append_regfile - append data to tar archives


#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);
This man page documents version 1.2 of libtar.
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.


On successful completion, these functions will return 0. On failure, they will return -1 and set errno to an appropriate value.


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.


read(2), open(2), lstat(2), th_write(3) TAR_APPEND_FILE(3)

Copyright © 2011–2018 by topics-of-interest.com . All rights reserved. Hosted by all-inkl.
Contact · Imprint · Privacy

Page generated in 233.16ms.

HTML Referenz | doomsdaydude.de | daelim-forum.spreadshirt.de