Author haypo
Recipients benhoyt, ethan.furman, gvanrossum, haypo, pitrou, serhiy.storchaka
Date 2016-01-06.23:03:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452121437.47.0.436078655626.issue26032@psf.upfronthosting.co.za>
In-reply-to
Content
> 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:
https://docs.python.org/dev/library/os.html#os.DirEntry
History
Date User Action Args
2016-01-06 23:03:57hayposetrecipients: + haypo, gvanrossum, pitrou, benhoyt, ethan.furman, serhiy.storchaka
2016-01-06 23:03:57hayposetmessageid: <1452121437.47.0.436078655626.issue26032@psf.upfronthosting.co.za>
2016-01-06 23:03:57haypolinkissue26032 messages
2016-01-06 23:03:57haypocreate