This issue was originally filed by @seaneagan
FileStat.mode presumably (see issue #22036) allows detection of whether which roles (world, group, user) have which permissions (read, write, execute, sticky bit, set uid, set gid) to the file/directory being statted. But unless we can access the uid and gid of the current process and the file stat, there is no way to tell which permissions the current process has by virtue of its uid and gid.
This issue was originally filed by @seaneagan
FileStat.mode presumably (see issue #22036) allows detection of whether which roles (world, group, user) have which permissions (read, write, execute, sticky bit, set uid, set gid) to the file/directory being statted. But unless we can access the uid and gid of the current process and the file stat, there is no way to tell which permissions the current process has by virtue of its uid and gid.