[Python-Dev] PEP 471 (scandir): Add a new DirEntry.inode() method?

Ben Hoyt benhoyt at gmail.com
Fri Feb 13 14:40:14 CET 2015


> TL;DR: on POSIX, is it useful to know the inode number (st_ino)
> without the device number (st_dev)?

I can't answer this question (not being a Linux dev and not knowing
much about this), but I'm +1 for adding DirEntry.inode().

On Windows, we're exposing all the information FindFirst/FindNext give
us, but on Linux we expose everything useful from readdir except
d_ino, which is easy to add, and according to that reddit comment, may
make scandir useful in more real scenarios.

-Ben


More information about the Python-Dev mailing list