docs: function transfer(root, map, opts) {
  	map = filter(map, opts);
  	var folders = [];
  
  	function getIndex(k) {
  		var index = k;
  		if (opts.relative) {
  			var replace = opts.relative === true ? (root._path + path.sep) : opts.relative;
  			index =  k.replace(replace, '');
  		}
  		return index;
  	}
  
  	Object.keys(map).forEach(function (k) {
  		var index = getIndex(map[k]._path);
  
  		if (map[k]._type === 'directory') {
  			folders.push(map[k]);
  			if (opts.type !== 'file' && !(opts.match || opts.ext)) {
  				root[index] = map[k];
  			}
  		}
  		if (map[k]._type === 'file' && (!opts.type || opts.type === 'file')) {
  			root[index] = map[k];
  		}
  	});
  
  	return folders;
  }