generic interface to read file attributes.