code: function (dir) {
      if (!dir) {
          dir='';
          log.i('Now start qiniu sync.'.yellow);
      }
      var files = fs.readdirSync(path.join(local_dir,dir));
      files.forEach(function(file)  {
          var fname = path.join(local_dir + '', dir + '', file + '');
      var stat = fs.lstatSync(fname);
          if(stat.isDirectory() == true) {
              sync(path.join(dir + '', file + ''));
          } else  {
              var name = path.join(dirPrefix, fname.replace(local_dir, '')).replace(/\\/g, '/').replace(/^\//g, '');
  
              if (!isIgnoringFiles(name)) {
                  check_upload(fname, name);
              } else {
                  ignoring_log && log.i(name + ' ignoring.'.yellow);
              }
          }
      })
  }
docs: 遍历目录进行上传