al_make_directory(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– al_make_directory πŸ’–

okay bestie, welcome to the Allegro 5 API corner of the Allegro reference manual, where we make folders like it's nothing πŸŽ€ this one's al_make_directory(3alleg5) and she's a whole vibe.


✨ NAME ✨

al_make_directory β€” the Allegro 5 API function that just. makes. a directory. slay πŸ¦‹


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

bool al_make_directory(const char *path)

like, one include, one call, zero drama πŸ’…


πŸ’« DESCRIPTION πŸ’«

So here's the tea: this function creates a new directory on the filesystem. and not just that one directory either β€” she also creates any parent directories as needed, because she's a generous queen πŸ‘‘ you want a folder three levels deep? she's already on it, building the whole little path family for you. main character energy fr fr ✨

And the returns? Here's how she reports back:

  • Returns true on success β€” and yes, that includes if the directory already exists, so she's not gonna be weird about it if the folder was already there. she's chill like that 🫢
  • Otherwise returns false on error. 😭

And when things go sideways, she fills in Allegro's errno to indicate the error β€” so go check that if you're confused about why she said no.

lowkey reminder: false means check your errno, bestie, don't just sit there guessing πŸ’€

🌈 SEE ALSO 🌈


and that's the whole page, periodt πŸ’œ mwah, tysm for reading, this was al_make_directory(3alleg5) from the Allegro reference manual β€” go forth and make folders, icon, you got this πŸŽ€βœ¨πŸŒΈ

πŸ“¦ where this page comes from