logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tar_extract_all, tar_extract_glob, tar_append_tree - high-level tar archive manipulation functions

Description

       The  tar_extract_all()  function extracts all files from the tar archive associated with the TAR handle t
       into the path named by the prefix argument.

       The tar_extract_glob() function extracts all files matching the given glob pattern from the  tar  archive
       associated with the TAR handle t into the path named by the prefix argument.

       The  tar_append_tree()  function  appends  all  files from the directory tree named by realdir to the tar
       archive associated with the TAR handle t.  The pathnames stored  in  the  tar  archive  are  modified  by
       replacing realdir with savedir, so that the files will be extracted into savedir.

Errors

       These functions will fail under the same conditions that the  tar_skip_regfile(),  tar_extract_regfile(),
       opendir(), lstat(), or tar_append_file() functions fail.

Name

       tar_extract_all, tar_extract_glob, tar_append_tree - high-level tar archive manipulation functions

Return Values

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

See Also

opendir(2), lstat(2), tar_skip_regfile(3), tar_extract_regfile(3), tar_append_file(3)

University of Illinois                              Jan 2001                                  tar_extract_all(3)

Synopsis

#include<libtar.h>inttar_extract_all(TAR*t,char*prefix);inttar_extract_glob(TAR*t,char*globname,char*prefix);inttar_append_tree(TAR*t,char*realdir,char*savedir);

Version

       This man page documents version 1.2 of libtar.

See Also