MCPcopy Index your code
hub / github.com/RustPython/RustPython / isabs

Function isabs

Lib/posixpath.py:61–65  ·  view source on GitHub ↗

Test whether a path is absolute

(s)

Source from the content-addressed store, hash-verified

59# Trivial in Posix, harder on the Mac or MS-DOS.
60
61def isabs(s):
62 """Test whether a path is absolute"""
63 s = os.fspath(s)
64 sep = _get_sep(s)
65 return s.startswith(sep)
66
67
68# Join pathnames.

Callers

nothing calls this directly

Calls 2

_get_sepFunction · 0.85
startswithMethod · 0.45

Tested by

no test coverage detected