node fs lstat 如何区别文件和文件夹

通过lstat 得到 文件的描述对象 stat。

stat.isFile()

stat.isDirectory()

posted @ 2016-12-07 19:58  winenr123  阅读(777)  评论(0)    收藏  举报