---
name: "th_get_uid"
section: "3"
platform: "linux"
package: "libtar"
version: "1.2.20-8"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/th_get_pathname"
---

# th\_get\_uid(3)

extract individual fields of a tar header TH\_ISREG, TH\_ISLNK, TH\_ISSYM, TH\_ISCHR, TH\_ISBLK, TH\_ISDIR, TH\_ISFIFO - determine what kind of file a tar header refers to TH\_ISLONGNAME, TH\_ISLONGLINK - determine whether the GNU extensions are in use

Part of [th\_get\_pathname(3)](/th_get_pathname/3.md).

## NAME

th\_get\_pathname, th\_get\_uid, th\_get\_gid, th\_get\_mode, th\_get\_crc, th\_get\_size, th\_get\_mtime, th\_get\_devmajor, th\_get\_devminor, th\_get\_linkname - extract individual fields of a tar header

TH\_ISREG, TH\_ISLNK, TH\_ISSYM, TH\_ISCHR, TH\_ISBLK, TH\_ISDIR, TH\_ISFIFO - determine what kind of file a tar header refers to

TH\_ISLONGNAME, TH\_ISLONGLINK - determine whether the GNU extensions are in use

## SYNOPSIS

**#include \<libtar.h\>**

**char \*th\_get\_linkname(TAR \****t***);**

**char \*th\_get\_pathname(TAR \****t***);**

**mode\_t th\_get\_mode(TAR \****t***);**

**uid\_t th\_get\_uid(TAR \****t***);**

**gid\_t th\_get\_gid(TAR \****t***);**

**int th\_get\_crc(TAR \****t***);**

**off\_t th\_get\_size(TAR \****t***);**

**time\_t th\_get\_mtime(TAR \****t***);**

**major\_t th\_get\_devmajor(TAR \****t***);**

**minor\_t th\_get\_devminor(TAR \****t***);**

**int TH\_ISREG(TAR \****t***);**

**int TH\_ISLNK(TAR \****t***);**

**int TH\_ISSYM(TAR \****t***);**

**int TH\_ISCHR(TAR \****t***);**

**int TH\_ISBLK(TAR \****t***);**

**int TH\_ISDIR(TAR \****t***);**

**int TH\_ISFIFO(TAR \****t***);**

**int TH\_ISLONGNAME(TAR \****t***);**

**int TH\_ISLONGLINK(TAR \****t***);**

## VERSION

This man page documents version 1.2 of **libtar**.

## DESCRIPTION

The **th\_get\_\***() functions extract individual fields from the current tar header associated with the *TAR* handle *t*.

The **TH\_IS\***() macros are used to evaluate what kind of file is pointed to by the current tar header associated with the *TAR* handle *t*.

The **TH\_ISLONGNAME**() and **TH\_ISLONGLINK**() macros evaluate whether or not the GNU extensions are used by the current tar header associated with the *TAR* handle *t*.  This is only relevant if the **TAR\_GNU** option was used when *tar\_open*() was called.

## SEE ALSO

[**tar\_open**(3)](/tar_open/3.md)
