On Mon, May 13, 2013 at 12:11 PM, Victor Stinner <victor.stinner at gmail.com> wrote: > 2013/5/13 Ben Hoyt <benhoyt at gmail.com>: >> class DirEntry: >> ... >> def lstat(self): >> if self._lstat is None: >> self._lstat = os.lstat(os.path.join(self._path, self.name)) >> return self._lstat >> ... > > You need to provide a way to invalidate the stat cache, > DirEntry.clearcache() for example. Hmm, I'm not sure why, as the stat result is cached on the DirEntry instance (not the class). If you don't want the cached version, just call os.stat() yourself, or throw away the DirEntry instance. DirEntry instances would just be used for dealing with scandir() results. -Ben
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4