Thomas Munro <thomas.munro@gmail.com> writes: > You don't need to call stat() just to find out if a dirent is a file > or directory, most of the time. Please see attached.
Hm. If we do this, I can see wanting to apply the knowledge in more places than walkdir().
Win32 could also benefit from this micro-optimisation if we expanded the dirent port to include d_type. Please find attached a patch that does so.