Not finding any directories

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


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

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the physfs mailing list