Because symbolic links get special treatment, use the lstat function here.
因为符号链接需要特殊的处理,所以这里使用了lstat函数。
If you want to be able to detect symbolic links as well, use lstat on a file name.
如果您想能够检测出符号链接,那么可以对文件名使用lstat 。
Now that you have a the entry name of the directory, you need to construct a more complete path (see Listing 5), and then call lstat to get the entry's information.
既然已经得到了目录的条目名称,那么您需要构造一个更加完整的路径(请参见清单5),然后调用lstat以获取该条目的相关信息。
Now that you have a the entry name of the directory, you need to construct a more complete path (see Listing 5), and then call lstat to get the entry's information.
既然已经得到了目录的条目名称,那么您需要构造一个更加完整的路径(请参见清单5),然后调用lstat以获取该条目的相关信息。
应用推荐