MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / abspath

Function abspath

tools/python-3.11.9-amd64/Lib/posixpath.py:397–406  ·  view source on GitHub ↗

Return an absolute path.

(path)

Source from the content-addressed store, hash-verified

395
396
397def abspath(path):
398 """Return an absolute path."""
399 path = os.fspath(path)
400 if not isabs(path):
401 if isinstance(path, bytes):
402 cwd = os.getcwdb()
403 else:
404 cwd = os.getcwd()
405 path = join(cwd, path)
406 return normpath(path)
407
408
409# Return a canonical path (i.e. the absolute location of a file on the

Callers 2

realpathFunction · 0.70
relpathFunction · 0.70

Calls 3

isabsFunction · 0.70
joinFunction · 0.70
normpathFunction · 0.70

Tested by

no test coverage detected