If you want to be able to detect symbolic links as well , use lstat () on a file name .
如果您想能够检测出符号链接,那么可以对文件名使用lstat()。