SDL_GetCurrentDirectory - Man Page

Get what the system believes is the "current working directory."

Synopsis

#include <SDL3/SDL_filesystem.h>

char * SDL_GetCurrentDirectory(void);

Description

For systems without a concept of a current working directory, this will still attempt to provide something reasonable.

SDL does not provide a means to _change_ the current working directory; for platforms without this concept, this would cause surprises with file access outside of SDL.

The returned path is guaranteed to end with a path separator ('\' on Windows, '/' on most other platforms).

Return Value

when it is no longer needed.

Availability

This function is available since SDL 3.2.0.

Info

SDL 3.2.16 Simple Directmedia Layer SDL3 FUNCTIONS