frazer,
It is "rwx" binary bits repeated three times for owner, group and others.
In Unix, 4 is read, 2 write, and 1 execute. Therefore, read and write for
owner would be 600 octal.
In windows, unfortunately the Attrib command has ReadOnly, Archive, System,
and Hidden attributes.
Moreover, the permission are not divided into owner, group and everyone.
They are far more sophisticated.
While in C or C# you may simulate the bitfields, the O/S level equivalent is
hard to obtain.
Thanks,
Fakher Halim
Software Architect,
TPG
"frazer" <ic***@hotmail.com> wrote in message
news:ek*************@TK2MSFTNGP11.phx.gbl...
hi ,
I want to simulate the chmod utility in unix where
chmod 777 gives everyone all access.
how do i create an enum so that 4 means read and write perm.
(read=1
write=3
full=7 not sure about chmod values for read write and execute.)
can anyone give me an idea how to go about it?
thnx
"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:#0**************@TK2MSFTNGP09.phx.gbl...
"ichor" <ic***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl... what does this at the begining of a class mean?
[Flags]
It marks an enum as being a set of flags(ie a bitfield). The only
visible effect you'll see while using C# is that ToString() recognizes it and
results in a list of values ("EnumVal1, EnumVal2" for example) instead
of the name of the singular enum value.
Its possible that in other languages, Flags may be required to perform &
and | 's against it.