Add file type information to stat

I'm curious wether is would be possible to add a property telling us the file type in the stat command. I need to know wether it match a file, a directory or a link. Looking at the source code, I see that you have prepare the ground for a mechanism to retrieve extended attributes inside which i could find what I need. However, I also realized it would be hard for me to implement the feature. Hope you find the time to work on it. 
Thanks for your work, d.