const fs = require('fs'); fs.readdir('./','utf8',(err,data)=>{ console.log(data) }) 转载于:https://www.cnblogs.com/500m/p/10932256.html