更新时间:2023-09-28 07:53:15
您可以使用 fs.lstat
,然后在
You can use fs.lstat
and then call statis.isSymbolicLink()
on the fs.Stats
object that's passed into your lstat callback.
fs.lstat('myfilename', function(err, stats) {
console.log(stats.isSymbolicLink());
});