Hello everyone

Hello.
I just joined this list and already I have a question!
Imagine that.

I hope this is an easy one…

How do I get a list of the contents of sub-directories that would be found in the same directory as the application’s executable?

I’ve been working on these project for many years:

http://akrobiz.com/ezfb
http://akrobiz.com/laserboy

What I’d really like to do is disconnect LaserBoy from ezfb and use SDL instead. I want to be able to run LaserBoy on just about any computer. Currently, the text / graphical user interface for LaserBoy allows the user to choose to open a variety of files as input. These files are sorted into sub-directories. Once the user chooses a type of file, then LaserBoy shows a list of files of that type that are present on the hard drive. I achieve this in Linux by using a popen() to a shell and I read back what I get from issuing “ls -1 ./directory/*.type”. How do I do something like this that will work in every OS?

Thanks in advance.

Have a great day! James. :o)

Once the user chooses a type of file, then LaserBoy shows a list of files
of that type that are present on the hard drive. I achieve this in Linux by
using a popen() to a shell and I read back what I get from issuing “ls -1
./directory/*.type”. How do I do something like this that will work in every
OS?

With all due respect, your solution is absolutely horrible and it’s probably
illegal under various international war crime laws. If it isn’t, it should.
Do this instead :
http://www.siit.tu.ac.th/mdailey/class/2003_s2/its225/assignments/readdir.c

–Gabriel

Thanks.
I guess.

James. :o)----- Original Message -----
From: Gabriel Gambetta
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Saturday, April 12, 2008 3:04 PM
Subject: Re: [SDL] Hello everyone.

Once the user chooses a type of file, then LaserBoy shows a list of files of that type that are present on the hard drive. I achieve this in Linux by using a popen() to a shell and I read back what I get from issuing "ls -1 ./directory/*.type". How do I do something like this that will work in every OS?

With all due respect, your solution is absolutely horrible and it’s probably illegal under various international war crime laws. If it isn’t, it should. Do this instead : http://www.siit.tu.ac.th/mdailey/class/2003_s2/its225/assignments/readdir.c

–Gabriel



SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org