MCPcopy Index your code
hub / github.com/RustPython/RustPython / _delete

Method _delete

Lib/pathlib/__init__.py:1053–1064  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

1051 os.rmdir(self)
1052
1053 def _delete(self):
1054 """
1055 Delete this file or directory (including all sub-directories).
1056 """
1057 if self.is_symlink() or self.is_junction():
1058 self.unlink()
1059 elif self.is_dir():
1060 # Lazy import to improve module import time
1061 import shutil
1062 shutil.rmtree(self)
1063 else:
1064 self.unlink()
1065
1066 def rename(self, target):
1067 """

Callers 9

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

Calls 4

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