
Sept. 15, 2021
4:15 a.m.
On 9/15/21, Paul Moore <p.f.moore@gmail.com> wrote:
Just a somewhat off-topic note, but dir_fd arguments are only supported on Unix, and the functionality only appears to be present at the NT Kernel level on Windows, not in the Windows API.
Handle-relative paths are supported by all NT system calls that access object paths, but NT doesn't support ".." components. Normal user-mode programs can make system calls directly (e.g. call NtCreateFile instead of CreateFile), but even if Python bypassed the Windows API to support dir_fd, the lack of support for ".." components in relative paths would be an annoying inconsistency with POSIX dir_fd support.