2015-02-14 11:57 GMT+01:00 Victor Stinner <victor.stinner at gmail.com>: > I propose something else: a DirEntry.inode read-only property (...) Full DirEntry API: - name (str) attribute - path (str) read-only property, created at the first call - inode (int or None) attribute <=== my proposition - is_dir(*, follow_symlinks=True) - is_file(*, follow_symlinks=True) - is_symlink(*, follow_symlinks=True) - stat(*, follow_symlinks=True) is_dir(), is_file(), is_symlink() and stat() are method because they may all require a syscall (os.stat or os.lstat). They all cache their result. In some cases, the result is already known when DirEntry is created. In most cases, a single call to os.stat() is required to fill the result of all methods. Victor
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