Returns a document path for the given path params.
500992
private DocumentPath getDocumentPath(List<PathSegment> params) {
    if (params.isEmpty()) {
      return DocumentPath.ROOT;
    } else {
      return DocumentPath.from(params.stream().map(PathSegment::getPath).collect(Collectors.toList()));
    }
  }
154882
def docs(root_url, path):
    """"""
    root_url = root_url.rstrip('/')
    path = path.lstrip('/')
    if root_url == OLD_ROOT_URL:
        return 'https://docs.taskcluster.net/{}'.format(path)
    else:
        return '{}/docs/{}'.format(root_url, path)
120269
def getYamlDocument(filePath):
    
    with open(filePath) as stream:
        doc = yaml.load(stream)
        return doc
1140293
def path2route(path: SchemaPath) -> SchemaRoute:
        
        if path == "/" or path == "":
            return []
        nlist = path.split("/")
        prevns = None
        res = []
        for n in (nlist[1:] if path[0] == "/" else nlist):
            p, s, loc = n.partition(":")
            if s:
                if p == prevns:
                    raise InvalidSchemaPath(path)
                res.append((loc, p))
                prevns = p
            elif prevns:
                res.append((p, prevns))
            else:
                raise InvalidSchemaPath(path)
        return res
976968
def get_rel_path_fragment(self, doc_id):
        
        with self._index_lock:
            r = self._doc_index[doc_id]
        fp = r[-1]
        return fp[(len(self.path) + 1):]
1260611
def path(self, *path):
        """"""
        path = list(filter(None, path))
        path = self.unprefix(path)
        items = [self.prefix_] + path
        return self.join(*items)
1155662
function getFilePath (cfg, req) {
	const urlParsed = req[cfg.parsedURLName] || url.parse(req.url);
	return path.join(cfg.documentRoot, (urlParsed.pathname || '/'));
}
467741
def object_path(collection, id):
    """"""
    _logger.debug(type(id))
    _logger.debug(id)
    if isinstance(id, dict) and 'id' in id:
        id = id['id']
    normalized_id = normalize_text(str(id), lcase=False)
    return os.path.join(_basepath, collection,
        '%s.%s' % (normalized_id, _ext))
1105365
public Response get(String path, Map<String, String> params) throws IOException, RESTException {
        return get(path, params, null);
    }
968125
def doc_stream(path):
    
    with open(path, 'r') as f:
        for line in f:
            if line.strip():
                yield line
44005
def get(self, path, params, **options):
        
        return self.request('get', path, params=params, **options)
455056
def get_python_doc_path():
    
    if os.name == 'nt':
        doc_path = osp.join(sys.prefix, "Doc")
        if not osp.isdir(doc_path):
            return
        python_chm = [path for path in os.listdir(doc_path)
                      if re.match(r"(?i)Python[0-9]{3,6}.chm", path)]
        if python_chm:
            return file_uri(osp.join(doc_path, python_chm[0]))
    else:
        vinf = sys.version_info
        doc_path = '/usr/share/doc/python%d.%d/html' % (vinf[0], vinf[1])
    python_doc = osp.join(doc_path, "index.html")
    if osp.isfile(python_doc):
        return file_uri(python_doc)
1209745
function getUrlParams(path) {
    if (!path) {
      return {};
    }
    var bits = path.split('?');
    var querystring = bits.length > 1 ? bits[1] : '';
    return toObject(querystring);
  }
465999
function getPath( req, res, next ) {

	var path = req.path.replace( /\..*$/, '' ).replace( /\//g, '.' ).replace( /^\.conf/, '' ).replace( /\.$/, '' ).trim();

	if ( path.length < 1 ) {
		path = null;
	}

	var outputFilter = req.path.trim().match( /\.(.*)$/ );
	if ( outputFilter ) {
		outputFilter = outputFilter[1].trim();
	}

	if ( typeof outputFilter !== 'string' || outputFilter.length < 1 ) {
		outputFilter = 'json';
	}

	req.confPath = path;
	req.outputFilter = outputFilter;

	return next();

}
885845
@SuppressWarnings("unchecked")
  public String path(T target, Object... params) {
    if (params.length == 0) return path(target, Collections.emptyMap());

    if (params.length == 1 && params[0] instanceof Map<?, ?>) return pathMap(target, (Map<Object, Object>) params[0]);

    if (params.length % 2 == 1) throw new RuntimeException("Missing value for param: " + params[params.length - 1]);

    final Map<Object, Object> map = new HashMap<Object, Object>();
    for (int i = 0; i < params.length; i += 2) {
      final String key   = params[i].toString();
      final String value = params[i + 1].toString();
      map.put(key, value);
    }
    return pathMap(target, map);
  }
646805
function(path, params) {
        var queryString = this.query_string;
        for (var param in params) {
            var re = new RegExp(":"+ param)
            var found = false;
            if (path.search(re) != -1) {
                path = path.replace(re, params[param]);
                found = true;
            }
            for (var query in queryString) {
                if (queryString[query].search
                    && queryString[query].search(re) != -1) {
                    queryString[query] = queryString[query].replace(re, params[param]);
                    found = true;
                }
            }
            // exclude params in headers
            for (var header in this.headers) {
                if (this.headers[header].search(re) != -1) {
                    found = true;
                }
            }
            if (!found)
                queryString[param] = params[param];
        }
        var query = querystring.stringify(queryString);
        return path + ((query != "") ? "?"+ query : "");
    }
135657
def _extract_path_parameters_from_paths(paths):
    
    params = set()
    for path in paths:
        parts = PART_REGEX.split(path)
        for p in parts:
            match = PARAM_REGEX.match(p)
            if match:
                params.add(match.group("name"))
    return params