Its important to keep in mind the main benefit of scandir is you don't have to do ANY stat call in many cases, because the directory listing provides some subset of this info. On Linux you can at least tell if a path is a file or directory.  On windows there is much more info provided by the directory listing. Avoiding subsequent stat calls is also nice, but not nearly as important due to OS level caching.

Brendan Moloney
Research Associate
Advanced Imaging Research Center
Oregon Health Science University

From: Python-ideas [] on behalf of Guido van Rossum []
Sent: Wednesday, January 06, 2016 2:42 PM
To: Random832
Cc: Python-Ideas
Subject: Re: [Python-ideas] find-like functionality in pathlib

I couldn't help myself and coded up a prototype for the StatCache design I sketched. See Feedback welcome! On my Mac it only seems to offer limited benefits though...