Bug in File::TypesOfFileToFind


#1

The enum File::TypesOfFileToFind is not written correctly. The values should be bit-wise flags if they are not intended to be mutually exclusive. Also, currently File methods that use this class raise an assertion if the value is over 3, which means you can never use ignoreHiddenFiles.

This makes it impossible to list directories and files, but omit hidden entries. Or, it’s impossible to list “directories” and “files matching the wildcard”, etc.

thanks


#2

Erm… no, those numbers look fine to me. Yes, they’re 1, 2, 3, 4, but they’re also correct for using as bitwise flags.

And the assertion checks that it’s less than 7, so that’s also correct. Maybe you’re using a very old version?