nodejs path库使用

  1. 获取当前文件夹下的所有文件夹和文件
    1
    2
    3
    4
      let dirs = fs.readdirSync(__dirname)
    dirs.forEach(dir => {
    console.log(path.join(__dirname, dir))
    });
# nodejs

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×