目录

如何判断文件是不是目录

判断文件是否为目录可以使用方法 fileIo.statSync(dirPath).isDirectory()。返回结果为 true 表示是目录。

参考链接

isDirectory