Generalized checking of file attributes