diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2014-06-19 14:46:37 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2014-06-19 14:46:37 (GMT) |
commit | 63f277b6944d583596675970666bbf4152b83349 (patch) | |
tree | 56892f523e2da97d4bcec0593c919136516b1376 /Lib/stat.py | |
parent | 6ef1202eb9de1a402a3fe14df05d90ae93e78d3e (diff) | |
download | cpython-63f277b6944d583596675970666bbf4152b83349.zip cpython-63f277b6944d583596675970666bbf4152b83349.tar.gz cpython-63f277b6944d583596675970666bbf4152b83349.tar.bz2 |
Issue #21741: Add st_file_attributes to os.stat_result on Windows.
Patch by Ben Hoyt.
Diffstat (limited to 'Lib/stat.py')
-rw-r--r-- | Lib/stat.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Lib/stat.py b/Lib/stat.py index 3eecc3e..46837c0 100644 --- a/Lib/stat.py +++ b/Lib/stat.py @@ -148,6 +148,29 @@ def filemode(mode): perm.append("-") return "".join(perm) + +# Windows FILE_ATTRIBUTE constants for interpreting os.stat()'s +# "st_file_attributes" member + +FILE_ATTRIBUTE_ARCHIVE = 32 +FILE_ATTRIBUTE_COMPRESSED = 2048 +FILE_ATTRIBUTE_DEVICE = 64 +FILE_ATTRIBUTE_DIRECTORY = 16 +FILE_ATTRIBUTE_ENCRYPTED = 16384 +FILE_ATTRIBUTE_HIDDEN = 2 +FILE_ATTRIBUTE_INTEGRITY_STREAM = 32768 +FILE_ATTRIBUTE_NORMAL = 128 +FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 8192 +FILE_ATTRIBUTE_NO_SCRUB_DATA = 131072 +FILE_ATTRIBUTE_OFFLINE = 4096 +FILE_ATTRIBUTE_READONLY = 1 +FILE_ATTRIBUTE_REPARSE_POINT = 1024 +FILE_ATTRIBUTE_SPARSE_FILE = 512 +FILE_ATTRIBUTE_SYSTEM = 4 +FILE_ATTRIBUTE_TEMPORARY = 256 +FILE_ATTRIBUTE_VIRTUAL = 65536 + + # If available, use C implementation try: from _stat import * |