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

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

stat.isFile()

stat.isDirectory()

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