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

Method _delete

Lib/pathlib/__init__.py:1251–1262  ·  view source on GitHub ↗

Delete this file or directory (including all sub-directories).

(self)

Source from the content-addressed store, hash-verified

1249 os.rmdir(self)
1250
1251 def _delete(self):
1252 """
1253 Delete this file or directory (including all sub-directories).
1254 """
1255 if self.is_symlink() or self.is_junction():
1256 self.unlink()
1257 elif self.is_dir():
1258 # Lazy import to improve module import time
1259 import shutil
1260 shutil.rmtree(self)
1261 else:
1262 self.unlink()
1263
1264 def rename(self, target):
1265 """

Callers 10

moveMethod · 0.95
test_delete_fileMethod · 0.45
test_delete_dirMethod · 0.45
test_delete_symlinkMethod · 0.45
clearCanvasMethod · 0.45

Calls 4

is_symlinkMethod · 0.95
is_junctionMethod · 0.95
unlinkMethod · 0.95
is_dirMethod · 0.95