How do you determine using stat() whether a file is a symbolic link?
- by hora
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 whether a file is a symbolic link or not. From the man page for stat(), I see that there is a mode_t value defined, S_IFLNK.
This is how I'm trying to check whether a file is a…