How should I detect if a file is a symbolic link in Posix? If I were writing C, I could do it by lstat'ing, looking at the mode_t value in the result, and comparing it with S_IFLNK. Or at least I could on Sparc/Solaris. But the Posix encapsulation doesn't provide a FileMode value corresponding to S_IFLNK.