attr: make attributes depend on file type