MCPcopy Index your code
hub / github.com/python/cpython / vfspath

Function vfspath

Lib/pathlib/_os.py:250–261  ·  view source on GitHub ↗

Return the string representation of a virtual path object.

(obj)

Source from the content-addressed store, hash-verified

248
249
250def vfspath(obj):
251 """
252 Return the string representation of a virtual path object.
253 """
254 cls = type(obj)
255 try:
256 vfspath_method = cls.__vfspath__
257 except AttributeError:
258 cls_name = cls.__name__
259 raise TypeError(f"expected JoinablePath object, not {cls_name}") from None
260 else:
261 return vfspath_method(obj)
262
263
264def ensure_distinct_paths(source, target):

Callers 15

_copy_from_symlinkMethod · 0.90
concat_pathMethod · 0.90
anchorMethod · 0.90
nameMethod · 0.90
with_nameMethod · 0.90
partsMethod · 0.90
joinpathMethod · 0.90
__truediv__Method · 0.90
__rtruediv__Method · 0.90
parentMethod · 0.90
parentsMethod · 0.90
full_matchMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_vfspathMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…