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

Function _rmtree_inner

Lib/test/support/os_helper.py:425–439  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

423 from test.support import _force_run
424
425 def _rmtree_inner(path):
426 for name in _force_run(path, os.listdir, path):
427 fullname = os.path.join(path, name)
428 try:
429 mode = os.lstat(fullname).st_mode
430 except OSError as exc:
431 print("support.rmtree(): os.lstat(%r) failed with %s"
432 % (fullname, exc),
433 file=sys.__stderr__)
434 mode = 0
435 if stat.S_ISDIR(mode):
436 _waitfor(_rmtree_inner, fullname, waitall=True)
437 _force_run(fullname, os.rmdir, fullname)
438 else:
439 _force_run(fullname, os.unlink, fullname)
440 _waitfor(_rmtree_inner, path, waitall=True)
441 _waitfor(lambda p: _force_run(p, os.rmdir, p), path)
442

Callers 1

_rmtreeFunction · 0.85

Calls 4

_force_runFunction · 0.90
_waitforFunction · 0.85
lstatMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…