[New-bugs-announce] [issue25996] Add support of file descriptor in os.scandir()

Serhiy Storchaka report at bugs.python.org
Sat Jan 2 13:10:38 EST 2016


New submission from Serhiy Storchaka:

For now os.scandir() on Unix is implemented using opendir()/readdir()/closedir(). It accepts bytes and str pathname. But most functions in the os module that accept a pathname, accept also an open file descriptor. It is possible to implement this feature in scandir() with using fdopendir() instead of opendir(). This would allow to add a support of the dir_fd parameter in scandir(). And that would allow to implement os.fwalk() with scandir() and make more efficient implementation of os.walk() (because we no longer need to walk long path for deep directories, see issue15200).

----------
components: Extension Modules
messages: 257353
nosy: benhoyt, haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Add support of file descriptor in os.scandir()
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25996>
_______________________________________


More information about the New-bugs-announce mailing list