[SDL] Cross-platform file system support

Rob Probin rob at lightsoft.co.uk
Wed Aug 11 11:57:24 PDT 2004

I've been taking a look a method of getting good cross platform 
file-system support and wondered how other people approach it.

Currently, for cross-platform work,  I usually use C libraries for 
file access. These are great as cross-platform file tools but they 
have some pretty big limitations. For instance my save and preference 
files nearly always live close to the application.

At the moment this appears to be the approach of quite a few games - 
but it certainly isn't ideal on any of the current operating systems. 
I've had users complain about it and friends of mine complain about 
it with games generally. With any other application this would be 

I also wonder why SDL hasn't had extended file functions added - it 
seems such a obvious omission that I wonder what the problem is. 
Since SDL is such a powerful games library it seems like this is the 
next step in cross platform support.

I think I'd want to do the following:

* Get a basic directory listing
* Create a directory
* Get path to Home data directory (e.g. normal user document directory)
* Get path to Preference directory.
* Get the Normal Path separator character.
* Get a list of Illegal/Legal directory/file characters for this OS.
* Longer term goal - Unicode support.

Any comments?


More information about the SDL mailing list