![]() |
how to create directories with SDL in a portable manner? | ![]() |
AKHRES Nader
Guest
![]() |
![]() |
Hello,
I would like to create/delete directories from my SDL app. Does SDL or any additionnal lib provides portable way to deals with directories? _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
||||||||||
|
![]() |
how to create directories with SDL in a portable manner? | ![]() |
Jonny D
![]() |
![]() |
SDL does not cover filesystem management. I wrote a C++ wrapper for the C headers <sys/stat.h> and <dirent.h>, called goodIO, that you might find useful:http://code.bluedinosaurs.com/c++.html
The functions you want are ioNewDir, ioDelete, and ioList. You probably have to do recursive deletion yourself in order to delete a directory (I guess that's something to add to goodIO). You can check out the source for those functions to see how to use stat, mkdir, unlink/remove, and opendir/readdir as well. Jonny D On Sun, Mar 7, 2010 at 9:19 AM, AKHRES Nader wrote:
|
||||||||||||
|
![]() |
how to create directories with SDL in a portable manner? | ![]() |
AKHRES Nader
Guest
![]() |
![]() |
Sounds great.
Does it work on windows system? Le 20:59, Jonathan Dearborn a écrit :
|
||||||||||||||
|
![]() |
how to create directories with SDL in a portable manner? | ![]() |
Kamos
![]() |
![]() |
You could also use Boost Filesystem.
http://www.boost.org/doc/libs/1_42_0/libs/filesystem/doc/index.htm ---- Daniel Camozzato On Sun, Mar 7, 2010 at 12:56 PM, AKHRES Nader wrote:
|
||||||||||||||||
|
![]() |
how to create directories with SDL in a portable manner? | ![]() |
AKHRES Nader
Guest
![]() |
![]() |
thanks. But do I need to get all boost lib (too big) or just filesystem module?
Le 20:59, Daniel Camozzato a écrit :
|
||||||||||||||||||
|
![]() |
how to create directories with SDL in a portable manner? | ![]() |
Kamos
![]() |
![]() |
You will have to download the whole Boost package, but you can use the
filesystem library by itself. The filesystem library is one of the few libraries that need to be compiled (most are header-only). If you're using Windows + Visual Studio, there are instructions to get it working (look under section 5.2): http://www.boost.org/doc/libs/1_42_0/more/getting_started/windows.html ---- Daniel Camozzato On Mon, Mar 8, 2010 at 4:57 AM, AKHRES Nader wrote:
|
||||||||||||||||||||
|