al_read_directory(3alleg5)

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

✨ NAME ✨

al_read_directory β€” it's an Allegro 5 API thing, bestie πŸ’–


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

ALLEGRO_FS_ENTRY *al_read_directory(ALLEGRO_FS_ENTRY *e)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you've got a directory open, and you want the next item in it. That's literally it. al_read_directory reads the next directory item and hands you back a filesystem entry for it. main character behaviour fr fr πŸ‘‘

And if there's nothing left to read? Or if something goes sideways? You get NULL. Both cases, same answer, no cap. πŸ’€

🫢 When you're done with the entry it gives you, pls pls pls call al_destroy_fs_entry(3alleg5) on it. Don't just leave it lying around, that's not the vibe.

Also important, bestie: this function will ignore any files or directories named . or .. β€” you know, the ones that might exist on certain platforms and might mean the current directory and the parent directory. Not me skipping right past those πŸ™ˆβœ¨


πŸ’œ SEE ALSO πŸ’œ


that's the whole page, periodt πŸ’… this came to you straight from the Allegro reference manual, al_read_directory(3alleg5) edition β€” go slay some filesystem traversal, you got this πŸŽ€πŸ¦‹β­

πŸ“¦ where this page comes from