Not finding any directories

Berry, David David.Berry at dcita.gov.au
Wed Dec 15 22:27:56 EST 2004


Hi

I have the following code

char **rc = PHYSFS_enumerateFiles("music");
 char **i;

 for (i = rc; *i != NULL; i++)
 {
        if (PHYSFS_isDirectory(*i) != 0)
          logToFile(" * We've got dir [%s].", *i);
 }

I have a directory tree full of music files, and I am attempting to find
out all the directories contained within.

If I just log the string *i, I can see everything, files and directory
names - if I attempt to 'detect' a directory, I get nothing.

Eg: Just printing out the output gets

23:27:47 >  * We've got dir [Ace of Base - All That She Wants.MP3].
23:27:47 >  * We've got dir [BEVERLY HILLS COP.MP3].
23:27:47 >  * We've got dir [CD 4].	<---- These are directories
23:27:47 >  * We've got dir [CD 5].	<----- This is a directory

It's running on a XP box compiled with Bloodshed 4.9.9.1.

Any idea on why I can't detect my directories - or does someone have
some code to 'walk' a tree and display all the files contained within.
I'm writing a basic MP3 player - which you can point at your music store
and play everything.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/physfs/attachments/20041216/f7089aed/attachment.htm>


More information about the physfs mailing list