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-
In reply to Re: Re: Re: How to determine a file's type via stat()
by robartes
in thread How to determine a file's type via stat()
by draconis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |