SDL_RemovePath(3)
π SDL_RemovePath π
okay bestie so real quick β this is a page from the SDL3 FUNCTIONS manual, and today's main character is SDL_RemovePath. she's simple, she's iconic, she deletes one (1) thing. let's get into it π
β¨ NAME β¨
SDL_RemovePath β Remove a file or an empty directory. that's it. that's the whole job. no cap. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_filesystem.h>
bool SDL_RemovePath(const char *path);
yes girl, one include, one function call, one bool. lowkey the cleanest API you'll ever meet π«Ά
π¦ DESCRIPTION π¦
So here's the tea, and it's important tea: directories that are not empty will fail. this function will not recursely delete directory trees. she is NOT out here bulldozing a whole folder of your stuff β she's removing one file, or one directory that's already empty. if there's anything still inside, she's gonna say no. π
think of it like: she'll take the box out to the curb, but she will not go through the box for you. π¦
π FUNCTION PARAMETERS π
pathβ the path to remove from the filesystem. literally just point at the thing and she'll yeet it (as long as it's a file or an empty directory, per above π).
β RETURN VALUE β
Returns true on success or false on failure β and if it's a false girlie, call SDL_GetError() for more information. she's not gonna leave you guessing, she'll tell you what went wrong π
π 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. so if you're on anything older, that's a no from her π
and that's the whole page, bestie β short, sweet, and fully aware of her limits. v important energy ngl.
made with love by the Simple Directmedia Layer girlies, version SDL 3.4.18, page SDL_RemovePath(3). mwah πβ¨
π¦ 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