From 468c448bccf4788e57e7f4e484d0285da54dedc7 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 31 Oct 1990 11:25:23 +0000 Subject: Added S_IMODE() to strip the file type (S_IFMT) from a mode. --- Lib/stat.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/stat.py') 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 -- cgit v1.2.1