---
name: "zip_file_strerror"
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_file_strerror"
---

# zip\_file\_strerror(3)

get string representation for a zip error

## NAME

**zip\_file\_strerror**, **zip\_strerror** – get string representation for a zip error

## LIBRARY

libzip (-lzip)

## SYNOPSIS

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

*const* *char* *\**\

**zip\_file\_strerror**(*zip\_file\_t \*file*);

*const* *char* *\**\

**zip\_strerror**(*zip\_t \*archive*);

## DESCRIPTION

The **zip\_strerror**() function returns a string describing the last error for the zip archive *archive*, while the **zip\_file\_strerror**() function does the same for a zip file *file* (one file in an archive). The returned string must not be modified or freed, and becomes invalid when *archive* or *file*, respectively, is closed or on the next call to **zip\_strerror**() or **zip\_file\_strerror**(), respectively, for the same archive.

## RETURN VALUES

**zip\_file\_strerror**() and **zip\_strerror**() return a pointer to the error string.

## SEE ALSO

[libzip(3)](/libzip/3.md), [zip\_error\_strerror(3)](/zip_error_strerror/3.md)

## HISTORY

**zip\_file\_strerror**() and **zip\_strerror**() were added in libzip 0.6.

## AUTHORS

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