The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Feature request: get documents directory
jordonp


Joined: 27 Aug 2014
Posts: 1
Hi, I'm not sure if this is the right place to put this, but I think it would be useful to add this to the file system code.

We have SDL_GetBasePath and SDL_GetPrefPath, it would be great to also have SDL_GetDocsPath.
This would return your apps documents folder on iOS, My Documents on windows, ~/Documents on OSX and linux(or maybe just ~/ on linux), not sure about android, maybe sdcard?

This isn't hard to code myself but would be useful for cross-platform apps, especially on iOS since the documents directory is the only folder the user can access.

I know SDL_GetPrefPath gives you something you can save in, but documents would be better for files your game/app can open/edit such as with a level/map editor.