[Python-ideas] Extend the os.stat() result objects with methods like isfile() and isdir()
Andrew Barnert
abarnert at yahoo.com
Fri May 3 02:20:37 CEST 2013
From: Christian Heimes <christian at python.org>
Sent: Thursday, May 2, 2013 4:48 PM
Also:
> We have to agree on a set of names, though. IMHO the abbreviations from
> stat.h are clear and distinct: {'fifo', 'chr', 'dir',
> 'blk', 'reg',
> 'lnk', 'sock', 'door', 'port'}. door and port
> are special file types on
> Solaris.
Does Python have stat.S_ISDOOR on Solaris? (It doesn't on other POSIX systems, and it's not mentioned in the docs.)
Meanwhile, if we're going to add non-standard platform-specific flags, these aren't the only two. Mac and most other *BSD have WHT. (I believe recent linux/glibc doesn't expose it anymore, because it's treated as internal to certain unionfs implementations?)
POSIX 1.b also defines MQ, SEM, and SHM (although these aren't required to be stored inside the S_IFMT bits of mode).
More information about the Python-ideas
mailing list