code: function match(path) {
  
    if (!patterns) {
      patterns = fis.media().get('project.files', []);
  
      if (!Array.isArray(patterns)) {
        patterns = [patterns];
      }
  
      patterns = patterns.map(function(pattern) {
        var negate = false;
  
        if (pattern[0] === '!') {
          negate = true;
          pattern = pattern.substring(1);
        }
  
        pattern[0] === '/' && (pattern = pattern.substring(1));
  
        return {
          negate: negate,
          reg: _.glob(pattern)
        };
      });
    }
  
    path.indexOf(root) === 0 && (path = path.substring(root.length));
  
    var hitted = false;
    patterns.forEach(function(item) {
      if (hitted) {
        if (item.negate && item.reg.test(path)) {
          hitted = false;
        }
      } else {
        hitted = item.negate !== item.reg.test(path);
      }
    });
  
    return hitted;
  }
docs: 判断新加的文件是否满足用户指定。