> Implement GetNextFile() like this:
> Keep the directory list along with the enumeration.
> At the beginning the dirList is initialized to the root dir.
> 1. Pop a directory from the dirList or terminate (empty dirList).
> 2. Start directory enumeration.
> 3. If the enumeration yields a file, return it.
>    If a directory is obtained, add it to the dirList.
>    If the enumeration ends, go to step 1.

Something is definitely wrong with this algorithm... OK, let's say that at the 
beginning (before the first call to GetNextFile) I'll push "/" on the stack. 
But in GetNextFile I can't pop an item off the stack as the first thing it does 
every time it is called to obtain the next file - because then all it will do 
is return the first file in the directory.

Regards,
Vesselin
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to