summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-10-31 11:25:23 +0000
committerGuido van Rossum <guido@python.org>1990-10-31 11:25:23 +0000
commit37b5d42bf957960217ae15a70a0e3a4f731d7483 (patch)
treef4c5e5d3f54218e103bb6ab3545130d0a50e0179
parentbc440a1e5dbcd61d709d3124b6b3c4113fcec759 (diff)
downloadcpython-37b5d42bf957960217ae15a70a0e3a4f731d7483.tar.gz
Added S_IMODE() to strip the file type (S_IFMT) from a mode.
-rw-r--r--Lib/stat.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/stat.py b/Lib/stat.py
index 273745d803..fee49659a7 100644
--- a/Lib/stat.py
+++ b/Lib/stat.py
@@ -22,6 +22,8 @@ ST_ATIME = 7
ST_MTIME = 8
ST_CTIME = 9
+def S_IMODE(mode):
+ return mode%4096
def S_IFMT(mode):
return mode - mode%4096