Hi all,
If you view the code for this BCL enum you will see that it is a flags
enum that somewhat jumps around.
For example, here is a subset of the flags:
ReadExtendedAttributes = 8,
WriteExtendedAttributes = 16,
ExecuteFile = 32,
Traverse = 32,
DeleteSubdirectoriesAndFiles = 64,
ReadAttributes = 128,
WriteAttributes = 256,
Write = 278,
Delete = 65536,
ReadPermissions = 131072,
Read = 131209,
While I do understand that "Write" and "Read" are just shortcut flags
that mean combinations of other flags, I don't see why it suddenly
jumps from 256 to 65536. There's a whole range of base 2 numbers being
skipped.
Can anyone shed some light on this? Its not causing any particular bug
but I do want to simplify menu access control to some files and don't
want to provide the whole enum (so the "read" and "write" shortcuts
are actually useful). Also, when I look at security permissions on a
file in XP, I get 6 main permission options:
Full Control, Modify, Read & Execute, Read, Write, and Special.
While I can guess which of these map back to the above enum, it would
be only guessing. Does anyone know of an official affiliation between
these so I can mapt he correct enum values?
Cheers,
Steven Nagy