<p dir="ltr"><br>
On 14 Feb 2015 13:17, "Cameron Simpson" <<a href="mailto:cs@zip.com.au">cs@zip.com.au</a>> wrote:<br>
><br>
> -1 on that. People will use it! Given the doco above, it should be obvious under what circumstances one might choose to call stat, and making that stat overt means it is less likely to be called unwisely.<br>
><br>
> Since scandir is all about efficiency, providing a very costly convenience function seems to go against the grain.<br>
><br>
> Regarding usefulness: Victor, you've got the typical use case in another post (i.e. useful as in "advantageous"), and your own tests show that st_dev of the dir matches st_dev of a dir's entries in all normal/regular filesystems (i.e.  useful as in "meaningful/consistent").  Special filesystems like /dev may be weird, but people relying on this should be aware of the constraint anyway.  Since a directory at the low level is essentially a mapping of names to inodes within the directory's filesystem, this is to be expected.</p>
<p dir="ltr">+1 from me for Cameron's perspective & rationale - it's useful for detecting hardlinks, it will usually work, and the cases where it isn't sufficient on its own are filesystem handling edge cases in more ways than one.</p>
<p dir="ltr">Cheers,<br>
Nick.<br></p>
<p dir="ltr">><br>
> Cheers,<br>
> Cameron Simpson <<a href="mailto:cs@zip.com.au">cs@zip.com.au</a>><br>
><br>
> Uh, this is only temporary...unless it works.   - Red Green<br>
><br>
> _______________________________________________<br>
> Python-Dev mailing list<br>
> <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-dev">https://mail.python.org/mailman/listinfo/python-dev</a><br>
> Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com">https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com</a><br>
</p>