---
name: "zip_source_seek_write"
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_source_seek_write"
---

# zip\_source\_seek\_write(3)

set write offset in zip source

## NAME

**zip\_source\_seek\_write** – set write offset in zip source

## LIBRARY

libzip (-lzip)

## SYNOPSIS

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

*int*\

**zip\_source\_seek\_write**(*zip\_source\_t \*source*, *zip\_int64\_t offset*, *int whence*);

## DESCRIPTION

The function **zip\_source\_seek\_write**() sets the current write offset for *source*. Just like in [fseek(3)](/fseek/3.md), depending on the *whence* argument, the *offset* is counted relative from:

- SEEK\_SET

  start of file

- SEEK\_CUR

  current write offset in file

- SEEK\_END

  end of file

## RETURN VALUES

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in *source* is set to indicate the error.

## SEE ALSO

[libzip(3)](/libzip/3.md), [zip\_source(5)](/zip_source/5.md), [zip\_source\_begin\_write(3)](/zip_source_begin_write/3.md), [zip\_source\_commit\_write(3)](/zip_source_commit_write/3.md), [zip\_source\_rollback\_write(3)](/zip_source_rollback_write/3.md), [zip\_source\_tell\_write(3)](/zip_source_tell_write/3.md), [zip\_source\_write(3)](/zip_source_write/3.md)

## HISTORY

**zip\_source\_seek\_write**() was added in libzip 1.0.

## AUTHORS

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