---
name: "zzip_dir_free"
section: "3"
platform: "linux"
package: "libzzip-dev"
version: "0.13.78+dfsg.1-0.1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/zzip_dir_free"
---

# zzip\_dir\_free(3)

## NAME

zzip\_dir\_free, zzip\_dir\_close -

## SYNOPSIS

```
#include <zzip/lib.h>

int
zzip_dir_free(ZZIP_DIR* dir)
int
zzip_dir_close(ZZIP_DIR* dir)
```

## DESCRIPTION

 The *zzip\_dir\_free* function will free the zzip\_dir handle unless there are still zzip\_files attached (that may use its cache buffer). This is the inverse of *zzip\_dir\_alloc* , and both are helper functions used implicitly in other zzipcalls e.g. *zzip\_dir\_close* = zzip\_close

 returns zero on success returns the refcount when files are attached.

 It will also *free(2)* the *ZZIP\_DIR-handle* given. the counterpart for *zzip\_dir\_open* see also *zzip\_dir\_free*

## AUTHOR

 Guido Draheim \<guidod@gmx.de\> Tomi Ollila \<too@iki.fi\>

## COPYRIGHT

 Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL)

## SEE ALSO

 zzip\_dir\_alloc\_ext\_io
