I basically have to write a clone of the UNIX ls command for a class, and I\'ve got almost everything working. One thing I can\'t seem to figure out how to do is check wheth
You can't.
You need to use lstat() to stat the link itself, plain stat() will follow the link, and thus never "see" the link itself.
lstat()
stat()