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

Function dirname

Lib/ntpath.py:261–263  ·  view source on GitHub ↗

Returns the directory component of a pathname

(p, /)

Source from the content-addressed store, hash-verified

259# Return the head (dirname) part of a path.
260
261def dirname(p, /):
262 """Returns the directory component of a pathname"""
263 return split(p)[0]
264
265
266# Is a path a mount point?

Callers 10

openfileFunction · 0.90
copy_stripFunction · 0.90
show_idlehelpFunction · 0.90
load_testsFunction · 0.90
expanduserFunction · 0.70
_readlink_deepFunction · 0.70
get_pydoc_linkFunction · 0.50
search_upFunction · 0.50
getpath.pyFile · 0.50

Calls 1

splitFunction · 0.70

Tested by 2

openfileFunction · 0.72
get_pydoc_linkFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…