iob_addfile(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– iob_addfile(3) β€” Library Functions Manual πŸ’–

okay bestie, welcome to the iob_addfile(3) page, we're in the Library Functions Manual section and honestly this one is short and sweet, which is iconic of it. let's go ✨


🌸 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 πŸ’…

so the whole vibe of iob_addfile is: it schedules n bytes from the file descriptor fd, starting at offset off, to be written with the I/O batch b. that's it. that's the function. she's booked in, she'll get sent later πŸŽ€

⚠️ do NOT close fd before iob_send indicates it's done. like, for real. not a drill. that's the one rule and she's strict about it πŸ’€

and if you're sitting there thinking "girl, I want that file descriptor to be closed automatically by iob_reset" β€” then you want iob_addfile_close instead. use that one. slay 🌈

⭐ RETURN VALUE ⭐

  • returns 1 on success 🫢
  • returns 0 on failure 😭

πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page, no cap πŸ’œ it's from the Library Functions Manual and the footer is literally just the page title again β€” iob_addfile(3) β€” so consider this your little sign-off, mwah, go schedule your file regions responsibly πŸ§šπŸ’–