diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2024-01-15 12:22:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-15 12:22:43 +0100 |
commit | 2010d45327128594aed332befa687c8aead010bc (patch) | |
tree | 4545de42e4d6d99ea2bc8123aa987fac4bb4a7d4 /Lib/stat.py | |
parent | 892155d7365c9c4a6c2dd6850b4527222ba5c217 (diff) | |
download | cpython-2010d45327128594aed332befa687c8aead010bc.tar.gz cpython-2010d45327128594aed332befa687c8aead010bc.zip |
gh-113666: Adding missing UF_ and SF_ flags to module 'stat' (#113667)
Add some constants to module 'stat' that are used on macOS.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/stat.py')
-rw-r--r-- | Lib/stat.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Lib/stat.py b/Lib/stat.py index 52cadbf04f6..9167ab18594 100644 --- a/Lib/stat.py +++ b/Lib/stat.py @@ -2,6 +2,7 @@ Suggested usage: from stat import * """ +import sys # Indices for stat struct members in the tuple returned by os.stat() @@ -110,19 +111,25 @@ S_IWOTH = 0o0002 # write by others S_IXOTH = 0o0001 # execute by others # Names for file flags - +UF_SETTABLE = 0x0000ffff # owner settable flags UF_NODUMP = 0x00000001 # do not dump file UF_IMMUTABLE = 0x00000002 # file may not be changed UF_APPEND = 0x00000004 # file may only be appended to UF_OPAQUE = 0x00000008 # directory is opaque when viewed through a union stack UF_NOUNLINK = 0x00000010 # file may not be renamed or deleted -UF_COMPRESSED = 0x00000020 # OS X: file is hfs-compressed -UF_HIDDEN = 0x00008000 # OS X: file should not be displayed +UF_COMPRESSED = 0x00000020 # macOS: file is compressed +UF_TRACKED = 0x00000040 # macOS: used for handling document IDs +UF_DATAVAULT = 0x00000080 # macOS: entitlement needed for I/O +UF_HIDDEN = 0x00008000 # macOS: file should not be displayed +SF_SETTABLE = 0xffff0000 # superuser settable flags SF_ARCHIVED = 0x00010000 # file may be archived SF_IMMUTABLE = 0x00020000 # file may not be changed SF_APPEND = 0x00040000 # file may only be appended to +SF_RESTRICTED = 0x00080000 # macOS: entitlement needed for writing SF_NOUNLINK = 0x00100000 # file may not be renamed or deleted SF_SNAPSHOT = 0x00200000 # file is a snapshot file +SF_FIRMLINK = 0x00800000 # macOS: file is a firmlink +SF_DATALESS = 0x40000000 # macOS: file is a dataless object _filemode_table = ( |