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

# tar\_block\_write(3)

macros to call read and write functions for the correct tar archive type

Part of [tar\_block\_read(3)](/tar_block_read/3.md).

## NAME

tar\_block\_read, tar\_block\_write - macros to call read and write functions for the correct tar archive type

## SYNOPSIS

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

**int tar\_block\_read(TAR \****t***, char \****buf***);**

**int tar\_block\_write(TAR \****t***, char \****buf***);**

## VERSION

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

## DESCRIPTION

The **tar\_block\_read**() and **tar\_block\_write**() macros call the read and write functions for the tar archive type associated with the *TAR* handle *t*.  This type is set when the *TAR* handle is created using **tar\_open**().

## RETURN VALUE

These macros return the same values as the corresponding read and write functions.

## SEE ALSO

[**read**(2)](/read/2.md), [**write**(2)](/write/2.md), [**tar\_open**(3)](/tar_open/3.md)
