Bug or malfunction: DirectoryIterator


#1

Hi Ju!

The DirectoryIterator class collects the information of directories and files but does not allow retrieve directories. It only returns files on each iteration over next() function. I have a proposal: remove redundant “dirsFound” data member of the class and collect all information only to the “filesFound” member. Or reorganize the next() function to allow directories to be retrieved.


#2

That’s not a bug, it was just never supposed to return directories. I guess I could add it as a feature.

But dirsFound is certainly not redundant!


#3

[quote=“jules”]That’s not a bug, it was just never supposed to return directories. I guess I could add it as a feature.
[/quote]

Please, add the feature.
I wonder how am I supposed to build the directory tree without that feature? File::findChildFiles(…) only? I want to iterate over all objects inside a directory and I want to decide which object to handle and how.


#4