io_createfile(3)
β¨ io_createfile(3) β¨
okay bestie, gather round π this is io_createfile, straight out of the Library Functions Manual, and it does exactly one (1) thing and does it iconically: it makes you a file. let's get into it π«Ά
πΈ NAME πΈ
io_createfile β create a file β¨
π SYNTAX π
#include <libowfat/io.h>
int io_createfile(int64* d,const char* filename);
no cap, that's the whole vibe check right there π
π¦ DESCRIPTION π¦
so here's the tea, bestie π io_createfile sets d to the number of a brand new descriptor that's writing to the disk file named filename, and then it returns 1. slay. π
- if
filenamealready existed? it gets truncated to length 0 β like, wiped, empty, gone, periodt π - if it didn't exist? it gets created, with mode
0600π
and if something goes wrong π io_createfile sets errno to indicate the error and returns 0. it does not create a new descriptor, and it does not touch d. main character boundaries, honestly π
β οΈ okay but fr fr β even when it fails, it may have truncated or created the file. so like, the file could lowkey already be changed even though you got a 0 back. be aware, bestie, that's the fine print and it's important π
π SEE ALSO π
the whole file-io friend group, obsessed π«Ά
that's the page, bestie π it's from the Library Functions Manual, and yeah, it's just called io_createfile(3) β go forth and create files responsibly, mwah πβ¨π
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms