SDL_GetStoragePathInfo(3)

πŸ’– SDL_GetStoragePathInfo(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_GetStoragePathInfo πŸ’…


✨ NAME ✨

SDL_GetStoragePathInfo β€” get the tea β˜• on a filesystem path inside a storage container. Like, what even is that path? Is it there? Is it not? We're finding out.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_storage.h>

bool SDL_GetStoragePathInfo(SDL_Storage *storage, const char *path, SDL_PathInfo *info);

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • storage β€” a storage container. yeah. the container. the place where the stuff lives. that one 🫢
  • path β€” the path you wanna interrogate. ask it questions. it's the path to query, bestie.
  • info β€” a pointer that gets filled in with info about the path. or NULL if you literally just wanna check whether a file exists. lowkey the laziest possible query and honestly? valid.

πŸ’€ RETURN VALUE πŸ’€

Returns true on success, or false if the file doesn't exist β€” or if something else went wrong, because of course something else can go wrong 😭

If you're getting false and you're like "but WHY though", call SDL_GetError() for more information. it'll tell you. it always tells you. not me checking the error string every single time πŸ™ˆ


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. so if you're on something older, no it isn't, and that's the vibe check result 🌈


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, no cap πŸ’œ go forth and query your paths, icon queen πŸ‘‘

Simple Directmedia Layer β€” SDL 3.4.18 β€” SDL_GetStoragePathInfo(3), signing off πŸŽ€βœ¨

πŸ“¦ where this page comes from