I did try it before it become a part of standard library(3.5-->).
Was called scandir.walk() before it was implemented into os.walk().
Contributing os.scandir() to Python
Larz60+ Wrote:There's more, I haven't found out how to access it yet, but also gets the os.stat and 'other' information as well.It's build in now,so using os.walk() is the same as using os.scandir().
the claim is that it's 20 times faster than os.walk.
Was called scandir.walk() before it was implemented into os.walk().
Contributing os.scandir() to Python
Ben Hoyt Wrote: It’s now used inside the popular os.walk() function to speed up walking directory trees by a significant amount.