docs: function walk(patterns, cwd) {
  	var externals, files, locals;
  
  	if (typeof patterns === 'undefined') {
  		return [];
  	}
  
  	patterns = (patterns instanceof Array) ? patterns : [patterns];
  	cwd = cwd || process.cwd();
  
  	externals = [];
  	files = {};
  	locals = {};
  
  	each(patterns, function(pattern) {
  		var globbed;
  
  		globbed = glob.sync(pattern, {
  			cwd: cwd
  		});
  
  		globbed.forEach(function(filename) {
  			var file;
  
  			file = new File(cwd, filename);
  			files[file.path] = file;
  		});
  	});
  
  	each(_flatten(files), function(file, path) {
  		Array.prototype.push.apply(externals, file.external);
  		locals[pubname(path, cwd)] = file;
  	});
  
  	unique(externals);
  
  	return {
  		externals: externals,
  		locals: locals
  	};
  }