MCPcopy Index your code
hub / github.com/RustPython/RustPython / 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 4

openfileFunction · 0.90
expanduserFunction · 0.70
_readlink_deepFunction · 0.70
get_pydoc_linkFunction · 0.50

Calls 1

splitFunction · 0.70

Tested by 2

openfileFunction · 0.72
get_pydoc_linkFunction · 0.40