file_size_ex(3)
β¨ file_size_ex(3) β¨
okay so bestie, welcome to the Allegro manual π this one's a lil baby page but it's so useful, i promise. it's file_size_ex, and yes she's giving exactly what her name says. let's get into it π«Ά
πΈ NAME πΈ
file_size_ex β returns the size of a file in bytes. it lives in the Allegro game programming library, aka the place where all the good stuff is π
π SYNOPSIS π
#include <allegro.h>
uint64_t file_size_ex(const char *filename);
like. one include. one function call. that's it. iconic behavior honestly π
π¦ DESCRIPTION π¦
so what does she do?? she returns the size of a file, in bytes. that's the whole vibe. you hand her a filename, she hands you back a uint64_t and you're like "omg thank you" π
but here's the part you gotta know, no cap β if the file doesn't exist, or literally any error happens, she doesn't throw a fit and crash on you. nope. she returns zero and stores the system error code in errno. so if you get a 0 back, don't just assume "aw the file is empty i guess π" β check errno, bestie, because that 0 might be her politely telling you something went wrong π
lowkey the move: always checkerrnoafter a0. it's giving "read the room" energy fr fr π
π SEE ALSO π
that's the whole page, bestie, short and sweet like a lil strawberry π go forth and check your file sizes responsibly β¨
signing off β this was Allegro, version 4.4.3, and the manual page is dated file_size_ex(3). mwah π ππ¦π
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms