PEP 471: add the DirEntry.inode() method
Update the PEP according to the implementation.
This commit is contained in:
parent
3a6f06fe6e
commit
aab4743466
|
@ -118,6 +118,11 @@ following attributes and methods:
|
|||
path) -- the equivalent of ``os.path.join(scandir_path,
|
||||
entry.name)``
|
||||
|
||||
* ``inode()``: return the inode number of the entry. The result is cached on
|
||||
the ``DirEntry`` object, use ``os.stat(entry.path,
|
||||
follow_symlinks=False).st_ino`` to fetch up-to-date information.
|
||||
On Unix, no system call is required.
|
||||
|
||||
* ``is_dir(*, follow_symlinks=True)``: similar to
|
||||
``pathlib.Path.is_dir()``, but the return value is cached on the
|
||||
``DirEntry`` object; doesn't require a system call in most cases;
|
||||
|
|
Loading…
Reference in New Issue