[New-bugs-announce] [issue39099] scandir.dirfd() method

Giampaolo Rodola' report at bugs.python.org
Thu Dec 19 13:29:01 EST 2019

New submission from Giampaolo Rodola' <g.rodola at gmail.com>:

PR in attachment adds a new dirfd() method to the scandir() object (POSIX only). This can be be passed to os.* functions supporting the "dir_fd" parameter, and avoid opening a new fd as in:

    >>> dirfd = os.open("basename", os.O_RDONLY, dir_fd=topfd)

At the moment I am not sure if it's possible to also support Windows.

components: Library (Lib)
messages: 358686
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: scandir.dirfd() method
versions: Python 3.9

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list