mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
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>
This commit is contained in:
parent
892155d736
commit
2010d45327
5 changed files with 217 additions and 8 deletions
13
Lib/stat.py
13
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 = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue