mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
gh-83714: Implement os.statx() function (#139178)
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
27acaf1cb7
commit
fe9ac7fc8c
18 changed files with 1018 additions and 71 deletions
15
Lib/stat.py
15
Lib/stat.py
|
|
@ -200,6 +200,21 @@ def filemode(mode):
|
|||
FILE_ATTRIBUTE_VIRTUAL = 65536
|
||||
|
||||
|
||||
# Linux STATX_ATTR constants for interpreting os.statx()'s
|
||||
# "stx_attributes" and "stx_attributes_mask" members
|
||||
|
||||
STATX_ATTR_COMPRESSED = 0x00000004
|
||||
STATX_ATTR_IMMUTABLE = 0x00000010
|
||||
STATX_ATTR_APPEND = 0x00000020
|
||||
STATX_ATTR_NODUMP = 0x00000040
|
||||
STATX_ATTR_ENCRYPTED = 0x00000800
|
||||
STATX_ATTR_AUTOMOUNT = 0x00001000
|
||||
STATX_ATTR_MOUNT_ROOT = 0x00002000
|
||||
STATX_ATTR_VERITY = 0x00100000
|
||||
STATX_ATTR_DAX = 0x00200000
|
||||
STATX_ATTR_WRITE_ATOMIC = 0x00400000
|
||||
|
||||
|
||||
# If available, use C implementation
|
||||
try:
|
||||
from _stat import *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue