/*
Gets the api path.
431965
public String getApiPath(String path) {
        String apiPath = getApiEndpoint() + path;

        if (!apiPath.endsWith("/")) {
            apiPath += Character.toString('/');
        }
        return apiPath;
    }
981684
def path(self):
        
        return "/".join([
            part
            for part in [
                self.version,
                self.qualifier,
            ]
            if part
        ])
451128
public String getRawPath() {
    List<String> pathParts = this.pathParts;
    if (pathParts == null) {
      return null;
    }
    StringBuilder buf = new StringBuilder();
    appendRawPathFromParts(buf);
    return buf.toString();
  }
1329873
def _x_get_physical_path(self):
        
        path = self.context.getPath()
        portal_path = api.get_path(api.get_portal())
        if portal_path not in path:
            return "{}/{}".format(portal_path, path)
        return path
1120668
def api_url(self):
        ''''''
        return pathjoin(Request.path, self.id, url=self.bin.api_url)
971534
@Override
  public PathImpl getPath(String name)
  {
    if (_prefix != null && _pathPrefix == null)
      _pathPrefix = _prefix.replace('.', '/');

    if (_pathPrefix != null && ! name.startsWith(_pathPrefix))
      return null;

    if (name.startsWith("/"))
      return _path.lookup("." + name);
    else
      return _path.lookup(name);
  }
935417
private String getHttpPath(String httpPath) {
    if(httpPath == null || httpPath.equals("")) {
      httpPath = "/*";
    }
    else {
      if(!httpPath.startsWith("/")) {
        httpPath = "/" + httpPath;
      }
      if(httpPath.endsWith("/")) {
        httpPath = httpPath + "*";
      }
      if(!httpPath.endsWith("/*")) {
        httpPath = httpPath + "/*";
      }
    }
    return httpPath;
  }
732683
public String getAsPath() {
    // String.replaceAll() - cannot be used because of it uses a regex as a
    // parameter and a '.'(dot) means a any symbol.
    StringBuffer str = new StringBuffer();
    for (int i = 0; i < folderId.length(); i++)
      if (folderId.charAt(i) == '.')
        str.append('/');
      else
        str.append(folderId.charAt(i));
    return str.toString();
  }
129249
public String getRequestPath() {
        StringBuilder builder;

        synchronized (tryLock) {
            builder = new StringBuilder(path.length() + 10);
            builder.append('/');
            if (!path.isEmpty()) {
                try {
                    builder.append(new URI(null, null, path, null).getRawPath());
                } catch (URISyntaxException e) {
                    throw new IllegalStateException();
                }
                if (tryDir) {
                    builder.append('/');
                }
            }
            if (encodedQuery != null) {
                builder.append('?');
                builder.append(encodedQuery);
            }
        }
        return builder.toString();
    }
831028
function getPathFromRequest (req, useBase, usePathAsTransactionName) {
  // Static serving route
  if (req[symbols.staticFile]) {
    return 'static file'
  }

  var path = getStackPath(req)
  var route = routePath(req.route)

  if (route) {
    return path ? join([ path, route ]) : route
  }

  if (useBase) {
    return path
  }

  // Enable usePathAsTransactionName config
  if (usePathAsTransactionName) {
    const parsed = parseUrl(req)
    return parsed && parsed.pathname
  }
}
415969
private static String getPath(Service service, Annotation... qualifiers) {
        for (Annotation q : qualifiers) {
            if (q instanceof Scheme) {
                return ((Scheme) q).value();
            }
        }

        if (service.getMetadata() != null && service.getMetadata().getAnnotations() != null) {
            String s = service.getMetadata().getAnnotations().get(SERVICE_SCHEME);
            if (s != null && s.isEmpty()) {
                return s;
            }
        }
        return DEFAULT_PATH;
    }
165193
function getPath (obj, ks) {
      ks = typeof ks == "string" ? keysFromPath(ks) : ks;

      var i = -1, length = ks.length;

      // If the obj is null or undefined we have to break as
      // a TypeError will result trying to access any property
      // Otherwise keep incrementally access the next property in
      // ks until complete
      while (++i < length && obj != null) {
        obj = obj[ks[i]];
      }
      return i === length ? obj : void 0;
    }
282943
@Override
    public String getPath() {
    	String result;

    	result = path.toString().substring(getRoot().getAbsolute().length());
    	return result.replace(File.separatorChar, Filesystem.SEPARATOR_CHAR);
    }
1205361
private Path getCollectionPath() {
        Path collectionPath = PathUtils.ReportsDirectory.getPathForObject(getInstance());
        return collectionPath.resolve(provider.getArtifactPath(getInstance()));
    }
949804
private String getRequestPath(HttpServletRequest request) {
		String url = request.getServletPath();

		if (request.getPathInfo() != null) {
			url += request.getPathInfo();
		}

		return url;
	}
76440
function getAllApis( apiDir ) {
	var localApiDir    = apiDir,
		apis = {},
		apiDirPath = getAbsolutePath(apiDir);

	var	apiFiles = fs.readdirSync(apiDirPath);

	apiFiles.forEach( function( possibleFile ) {

		var alteredPath = path.resolve(apiDirPath,possibleFile);

		if( fs.statSync(alteredPath).isFile() ) {
			var api = require(getAbsolutePath("."+path.sep+localApiDir+path.sep+possibleFile));
			
			var funcs = Object.getOwnPropertyNames(api).filter(function isApiFunc(property){
				return typeof api[property] === 'function';
			});

			var funcObj = funcs.reduce( function reduceToMap( previous, current, index, array) {
				previous[current] = api[current];
				return previous;
			},{});

			// Strip out the extension
			var apiName = getExtensionlessFilename( possibleFile );
			
			templateWithArgs( apiDir, apiName, funcs );
			apis[apiName] = { funcs: funcObj, 
								  api: api };
		}
	});

	return apis;
}
591467
public String getRequestPath() {
        Map<String,String> requestHeaders = getRequestHeaders();
        if (requestHeaders == null)
            return null;
        String path = requestHeaders.get(Listener.METAINFO_REQUEST_PATH);
        return path.startsWith("/") ? path : "/" + path;
    }