This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients benhoyt, ethan.furman, gvanrossum, pitrou, serhiy.storchaka, vstinner
Date 2016-01-06.23:03:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> As I recall, if the platform's DirEntry doesn't provide the cacheable attributes when first called, those attributes will be looked up (and cached) on first access.

scandir() is not magic. It simply provides info given by the OS: see readdir() on UNIX and FindFirstFile()/FindNextFile() on Windows.

DirEntry calls os.stat() if needed, but it caches the result.

DirEntry doc tries to explain when syscalls or required or not, depending on the requested information and the platform:
Date User Action Args
2016-01-06 23:03:57vstinnersetrecipients: + vstinner, gvanrossum, pitrou, benhoyt, ethan.furman, serhiy.storchaka
2016-01-06 23:03:57vstinnersetmessageid: <>
2016-01-06 23:03:57vstinnerlinkissue26032 messages
2016-01-06 23:03:57vstinnercreate