MCPcopy Create free account
hub / github.com/EasyIME/PIME / parse_url_path

Method parse_url_path

python/python3/tornado/web.py:2987–2998  ·  view source on GitHub ↗

Converts a static URL path into a filesystem path. ``url_path`` is the path component of the URL with ``static_url_prefix`` removed. The return value should be filesystem path relative to ``static_path``. This is the inverse of `make_static_url`.

(self, url_path: str)

Source from the content-addressed store, hash-verified

2985 return "%s?v=%s" % (url, version_hash)
2986
2987 def parse_url_path(self, url_path: str) -> str:
2988 """Converts a static URL path into a filesystem path.
2989
2990 ``url_path`` is the path component of the URL with
2991 ``static_url_prefix`` removed. The return value should be
2992 filesystem path relative to ``static_path``.
2993
2994 This is the inverse of `make_static_url`.
2995 """
2996 if os.path.sep != "/":
2997 url_path = url_path.replace("/", os.path.sep)
2998 return url_path
2999
3000 @classmethod
3001 def get_version(cls, settings: Dict[str, Any], path: str) -> Optional[str]:

Callers 1

getMethod · 0.95

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected