If you simply want the permissions (lowest 3 bits) from this value, use
PERMS = BITAND(status<5>, 511)
which will return you simply 775 (in your instance). Using the #define values in stat.h you could create BITAND code to determine if you are looking at a link, a directory, a file, a character block device, etc.
Hope this helps!! Glenn
At 12:30 PM 8/5/2004, you wrote:
When doing a status on a file in a program, attribute 5 gives the permission's in decimal format so 33277 in decimal returns 100775 in octal. Why doesn't it just return the 775 value and or what is the significance of the 100?
thanks paul
Paul Boroditsch Computer Sciences Corporation [EMAIL PROTECTED]
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------- ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
"In the end, it all boils down to a big mess of 1's and 0's..." - unknown
Glenn M. Herbert - Development Engineer, DSEngine / Connectivity Group
[EMAIL PROTECTED], Westboro, Ma. 01581 (508) 599-7281
Ascential Software - Profit from Intelligent Information -------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/