[Python-ideas] IntFlags

Paul Moore p.f.moore at gmail.com
Wed Mar 4 21:17:27 CET 2015


On 4 March 2015 at 19:47, Skip Montanaro <skip.montanaro at gmail.com> wrote:
> On Wed, Mar 4, 2015 at 1:45 PM, <random832 at fastmail.us> wrote:
>
>> Any reason StatFlags shouldn't have a representation like "rwxr-x---" for 0750?
>
> I've never considered this before, but is this sort of thing portable
> to/meaningful on Windows?

Not really. Windows' actual ACL system is far too complex to fit into
9 bits. But the readable and writable bits are use to reflect the
readonly flag (which is a separate value from the ACLs) of a file (so
S_IREAD is always true, and S_IWRITE is true unless the file is
readonly). So you only ever get "'-rw-rw-rw-'" or "'-r--r--r--'"

Paul


More information about the Python-ideas mailing list