Remove the path contents recursively, even if some elements are read-only.
(path: Path)
| 145 | |
| 146 | |
| 147 | def rm_rf(path: Path) -> None: |
| 148 | """Remove the path contents recursively, even if some elements |
| 149 | are read-only.""" |
| 150 | path = ensure_extended_length_path(path) |
| 151 | onerror = partial(on_rm_rf_error, start_path=path) |
| 152 | shutil.rmtree(str(path), onerror=onerror) |
| 153 | |
| 154 | |
| 155 | def find_prefixed(root: Path, prefix: str) -> Iterator[Path]: |