SDL_GetPathInfo(3)
π SDL_GetPathInfo(3) π
okay so bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one's called SDL_GetPathInfo and it's literally the "what even is this path" detector π΅οΈβοΈβ¨
πΈ NAME πΈ
SDL_GetPathInfo β get information about a filesystem path. that's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_filesystem.h>
bool SDL_GetPathInfo(const char *path, SDL_PathInfo *info);
look at her. two args. returns a bool. iconic. π
π¦ DESCRIPTION π¦
so here's the tea π« β symlinks are ALWAYS followed on filesystems that support them. so you're never getting the info about the symlink itself, no ma'am, you get the info on whatever that symlink eventually points to. like, you asked about the girl and you got her whole friend group instead. no cap. π
π§ FUNCTION PARAMETERS π§
pathβ the path you wanna query. the one you're curious about. the main character of this operation. πinfoβ a pointer that gets filled in with the info about the path. OR you can passNULLβ in which case it's just checking whether the file exists at all. lowkey a whole vibe check for your file. π
π RETURN VALUE π
returns true on success, or false if the file doesn't exist, or if some other failure happened (rude). when that happens, hit up SDL_GetError() for the deets, she'll tell you what went wrong. π
π THREAD SAFETY π
it is safe to call this function from any thread. go wild, gorl. multi-threaded queen behavior fr fr. π§΅β¨
β AVAILABILITY β
this function has been available since SDL 3.2.0. so if you're on anything older... bestie. upgrade. π
and that's the whole page, periodt π this was written by the lovely folks at Simple Directmedia Layer, and it's page SDL_GetPathInfo(3) from SDL 3.4.18. mwah, go query some paths, you got this ππ«ΆπΈ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms