---
name: "iob_addfile"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/iob_addfile"
---

# iob\_addfile(3)

add file region to I/O batch

## NAME

iob\_addfile - add file region to I/O batch

## SYNTAX

**#include \<libowfat/iob.h\>**

int **iob\_addfile**(io\_batch\* b,int64 fd,uint64 off,uint64 n);

## DESCRIPTION

iob\_addfile schedules *n* bytes from the file descriptor *fd* starting at offset *off* to be written with the I/O batch *b*.

You may not close *fd* before iob\_send indicates it is done.

Use **iob\_addfile\_close** if you want the file descriptor to be closed automatically by **iob\_reset**.

## RETURN VALUE

Returns 1 on success, 0 on failure.

## SEE ALSO

[iob\_reset(3)](/iob_reset/3.md), [iob\_send(3)](/iob_send/3.md), [iob\_addbuf(3)](/iob_addbuf/3.md), [iob\_addfile\_close(3)](/iob_addfile_close/3.md)
