SDL_CreateDirectory(3)

πŸ’– SDL_CreateDirectory πŸ’–

okay bestie, welcome to the SDL_CreateDirectory page from the SDL3 FUNCTIONS corner of the manual ✨ this is the one that makes folders for you, no cap πŸŽ€


🌸 NAME 🌸

SDL_CreateDirectory β€” make a directory, and like, all the missing parent directories too 🫢 she's thorough.


✨ SYNOPSIS ✨

#include <SDL3/SDL_filesystem.h>

bool SDL_CreateDirectory(const char *path);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• this one reports success if path already exists as a directory β€” like, she's not gonna be dramatic about it, if it's already there she's chill πŸ’…

and if the parent directories are missing? she makes those too πŸ”₯ it's giving "I'll handle it, don't worry about it" main character energy πŸ‘‘

but listen β€” if this fails, it will not remove any parent directories it already made 😭 so yeah, partial results can stick around. no takebacks, fr fr.

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • path β€” the path of the directory to create πŸ“

⭐ RETURN VALUE ⭐

returns true on success or false on failure 🌈 and if it fails, call SDL_GetError() for more info, iykyk πŸ’œ


🧚 THREAD SAFETY 🧚

it is safe to call this function from any thread 🫢 go off, multithreaded queen πŸ‘‘


πŸ”₯ AVAILABILITY πŸ”₯

this function is available since SDL 3.2.0 ⭐


mwah πŸ’‹ that's the whole page bestie. go create some directories, you got this πŸ’–

β€” brought to you by Simple Directmedia Layer, from SDL 3.4.18, dated SDL_CreateDirectory(3) 🌸 slay responsibly ✨

πŸ“¦ where this page comes from