logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Availability

       This function is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.10                         SDL_GetCurrentDirectory(3)

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).

Header File

       Defined in SDL3/SDL_filesystem.h

Name

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

Return Value

       Returns a UTF-8 string of the current working directory in platform-dependent notation. NULL if there's a
       problem. This should be freed with SDL_free () when it is no longer needed.

Synopsis

#include"SDL3/SDL.h"char*SDL_GetCurrentDirectory(void);

See Also