PREV INDEX NEXT

Author: Unknown
Subject: Trailing slash makes symlink appear to be directory
Date: Thursday, 17 Sep 2020, 01:21:04

Hi Professor,

I am a bit confused as to how to handle a filename such as:
/c/cs323/Hwk1/Tests/Root/bravo/hotel/, which is a symbolic link.
Because of the trailing slash, however, if I run
stat /c/cs323/Hwk1/Tests/Root/bravo/hotel/, it shows that it is
a directory. Thus, something like S_ISLNK(buf.st_mode) will not 
return that it is a symbolic link.

Any help would be appreciated. Thank you!
PREV INDEX NEXT