nodejs里面怎么判断是不是文件夹
1 回答

慕妹3146593
TA贡献1820条经验 获得超9个赞
用下面代码就可以了
var fs = require("fs");
var stat = fs.lstatSync("./xx");console.log(stat.isDirectory());
如果返回结果为true则为文件夹。
- 1 回答
- 0 关注
- 2778 浏览
添加回答
举报
0/150
提交
取消