in reply to File/Dir Attributes
The stat() builtin function is what you're looking for. You may also be interested in the -X type functions which test specific bits of the stat info.