i am a bit confused about the way the flags and masks defined for st_mode have to be used..
Suppose that I lstat-ed a file and want to retrieve first is permission in numeric format (eg 755) and then simply check if the owner has execute permission..
In the second simplier case, I shall write something like:
if( (statbuff.st_mode & S_IRWXU) && S_IXUSR )
in the second case,isn't there a faster way to get the numbers 7 5 5 than making all the comparisons possible?