code: function eachFileSync(dir, findOneFile){
      const stats = fs.statSync(dir)
      if(stats.isDirectory()){
          fs.readdirSync(dir).forEach(file => {
              eachFileSync(path.join(dir, file), findOneFile)
          })
      }else{
          findOneFile(dir, stats)
      }
  }
docs: 同步遍历文件