in reply to Re: Re: How to determine a file's type via stat()
in thread How to determine a file's type via stat()
I know I can use the file-test operators. What I would like to know if if the first bit of the octal returned by stat for mode will reveal what it really is. So, for instance, if the first bit is a 2 then that means "X".
Actually, that's what the S_IF* functions do for you. If you want to do this yourself, have a look at the bitshift operators (<< and >>) to do bitwise arithmetic.
CU
Robartes-
|
|---|