---
name: "zip_add_dir"
section: "3"
platform: "linux"
package: "libzip"
version: "1.11.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/zip_add_dir"
---

# zip\_add\_dir(3)

add directory to zip archive (obsolete interface)

## NAME

**zip\_add\_dir** – add directory to zip archive (obsolete interface)

## LIBRARY

libzip (-lzip)

## SYNOPSIS

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

*zip\_int64\_t*\

**zip\_add\_dir**(*zip\_t \*archive*, *const char \*name*);

## DESCRIPTION

The function **zip\_add\_dir**() is the obsolete version of [zip\_dir\_add(3)](/zip_dir_add/3.md). It is the same as calling [zip\_dir\_add(3)](/zip_dir_add/3.md) with an empty flags argument.

## SEE ALSO

[libzip(3)](/libzip/3.md), [zip\_dir\_add(3)](/zip_dir_add/3.md)

## HISTORY

**zip\_add\_dir**() was added in libzip 0.8. In libzip 0.10 the return type was changed from *int* to *zip\_int64\_t*. It was deprecated in libzip 0.11, use **zip\_dir\_add**() instead.

## AUTHORS

Dieter Baron ⟨*dillo@nih.at*⟩ and Thomas Klausner ⟨*wiz@gatalith.at*⟩
